LINQ To SQL

Linq to Sql - Sort record on multiple columns in ascending or descending order

In SQL Server it's easy and we are familiar to sort orders on different columns but when it comes to Linq to SQL or Lamda expression we stuck how to sort the records, it is because we are experienced much. So let's discuss some daily use ordering of records with examples. **1**. Suppose we have an Employee table and want to sort on columns say "EmployeeName" in ascending order then ... By Mike .Net   On 30 Jan 2013  Viewed: 1,714
  • linq to sql

MVC paging with linq to sql and html helper class

To use paging in MVC you need to first create structure to pass values form page to HTML Helper class so first create a class to keep and pass the page information public class PagingInfo { public int TotalItems { get; set; } public int ItemsPerPage { get; set; } public int CurrentPage { get; set; } public int TotalPages { ... By Ali Adravi   On 03 Jan 2013  Viewed: 2,522
  • mvc
  • linq to sql

Linq to SQL connection String to read from web.config file automatically

When we use Linq to SQL it creates a connection string in Settings files. When we need to create the DLL of the DataAccessLayer (DAL) for production server or any server which is not our current development server then we need to change connection string manually in Settings file, is not it would be good to set something in application so it can always read the connection string form web.config... By Montana Neyra   On 17 Jun 2012  Viewed: 3,056
  • linq to sql
  • web.config
  • asp.net