Top "Linq-to-sql" questions

LINQ to SQL is a component of .NET Framework version 3.5 that provides a run-time infrastructure for managing relational data as objects stored in Microsoft SQL Server.

Linq to SQL - Return top n rows

I want to return the TOP 100 records using Linq.

.net linq-to-sql
Linq: adding conditions to the where clause conditionally

I have a query like this (from u in DataContext.Users where u.Division == strUserDiv && u.Age > 18 &…

linq entity-framework linq-to-sql
Using contains() in LINQ to SQL

I'm trying to implement a very basic keyword search in an application using linq-to-sql. My search terms are in an …

c# linq-to-sql contains keyword-search
What is "Audit Logout" in SQL Server Profiler?

I'm running a data import (using C#/Linq), and naturally I'm trying to optimize my queries as much as possible. …

c# linq sql-server-2005 linq-to-sql sql-server-profiler
Conditional Linq Queries

We're working on a Log Viewer. The use will have the option to filter by user, severity, etc. In the …

c# linq linq-to-sql .net-3.5
Linq to Sql: How to quickly clear a table

To delete all the rows in a table, I am currently doing the following: context.Entities.DeleteAllOnSubmit(context.Entities); context.…

c# linq-to-sql delete-row
Simple Examples of joining 2 and 3 table using lambda expression

Can anyone show me two simple examples of joining 2 and 3 tables using LAMBDA EXPRESSION( for example using Northwind tables (Orders,…

linq linq-to-sql c#-4.0 lambda c#-3.0
Nullable object must have a value?

On the line: bool travel = fill.travel.Value; I am getting the following error: Nullable object must have a value …

c# .net linq-to-sql exception-handling nullable
Get SQL query from LINQ to SQL?

I have a query which I am passing byte[] as a parameter. I am trying to get the SQL query …

c# .net linq-to-sql
A dependent property in a ReferentialConstraint is mapped to a store-generated column

I get this error when writing to the database: A dependent property in a ReferentialConstraint is mapped to a store-generated …

c# sql-server-2008 linq-to-sql entity-framework-4