Use this tag for code reviews of or involving Linq to SQL classes, mappings and associations, or for code reviews of or involving querying a System.Data.Linq.DataContext object with Linq statements.
0
votes
0answers
24 views
Is this pattern for passing a LinqToEntities connection safe? [on hold]
I've written a Data Access Layer for an MVC app I'm working on. Several Controller methods call several functions from the Data Access Layer. If more than one function is called, I initiate the ...
0
votes
1answer
145 views
Simplify IQueryable Linq to SQL query
Below I present to you an IQueryable LINQ to SQL query (used with NHibernate).
I have tried to simplify this query but I could not do it.
I want to run a query for searching information.
Options:
...
2
votes
1answer
113 views
Why is loading images taking so long?
When Page_Load is executed I assign the ImageUrl which is a IHTTPHandler:
...
3
votes
3answers
511 views
Code optimzation by constant if-structure iteration removal
Below you will find the specific code that I am attempting to optimize. I have a method previous to called getCount() which, based on similar parameters as below, ...
2
votes
2answers
203 views
Linq C# pulling from table row into input fields
Today is the first time I've used Linq, so I wanted to get a code review on this and make sure I'm going about it correctly.
I'm filling text boxes and dropdown lists from a table row.
...
10
votes
1answer
273 views
Password Manager UI: Populating DataGridView is Painfully Slow
I'm designing a small account/password manager using C# and SQL Server CE. LINQ to SQL is my ORM of choice.
Here's the data model representing how the SQL Server CE database is set up:
And here's ...
6
votes
1answer
4k views
A generic way to use LINQ to Entity with types and operations unknown until run time
A question was asked here about reflection and LINQ to entity. I'm trying to modify the code that was presented to fit my needs.
Here's what I am trying to accomplish: I'm writing back-end support ...
7
votes
1answer
651 views
Redundant DataContext ? - LINQ to SQL
This seems like a pretty basic question, so bear with me...Say I have two (or many) methods in the same class that need a LINQ to SQL DataContext. Additionally, I am needing the DataContext in other ...
2
votes
3answers
151 views
How to make my code faster and easier?
This is my .cs part code where I am calling storeprocedure in LINQ to SQL:
...
7
votes
1answer
122 views
Does this unusual data access pattern create any problems?
The background
Two beginners without access to an experienced mentor write an ASP .NET MVC application, mostly simple CRUD, using Linq to SQL for the data access layer. Beginner number 1 writes the ...
3
votes
1answer
227 views
LINQ statement to aggregate data
Teachers can raise 'dramas' which are when students forget equipment, don't do homework or are flagged for concern. Each drama for each student is stored as a separate record.
I seek a list of all ...