Problem I have the following code where I need to execute 2 Linq-to-SQL statements. If I do not have the […]
Tag: linq-to-sql
Inserting customer care database analysis detail records
Problem I have written this linq-to-sql query to insert a bunch of customer care database analysis detail records: DataClasses1DataContext behzad […]
Fetching a set of event IDs from a database based on a set of company IDs
Problem The following code fetches a set of company IDs from a database if there are any events associated with […]
Redundant DataContext ? – LINQ to SQL
Problem This seems like a pretty basic question, so bear with me…Say I have two (or many) methods in the […]
Simplifying a LINQ expression that finds the largest date smaller than another date
Problem I have a LINQ 2 SQL query that needs to run a subquery in the where clause. The subquery […]
Delayed Include rules for EntityTypeConfiguration using LINQ expressions
Problem The aim of this class is to set rules for including navigational properties on Configuration level and then apply […]
Linq Conditional where clause when parameter can be null
Problem I need to filter my records on the basis of “courseId” which is passed as parameter – Here is […]
Linq C# pulling from table row into input fields
Problem Today is the first time I’ve used Linq, so I wanted to get a code review on this and […]
Returning an IEnumerable using Linq-to-SQL which is then bound to a GridView
Problem This function works, but it’s really really slow and the generated SQL is gargantuan and horrible to look at. […]
Simplify IQueryable Linq to SQL query
Problem Below I present to you an IQueryable LINQ to SQL query (used with NHibernate). I have tried to simplify […]
- 1
- 2