Advantages of LINQ to SQL in ASP.Net

Last Reply one year ago By dharmendr

Posted one year ago

Hai all,

I am confusing in realtime development.Everyone knows what is the use of LINQ and EDM.

In my case , i am directly use the connection string in web.config file and i am not using any LINQ or EDM. 

My entered details or saved in database , edited and updated.

It's working fine in my scenario, but is there any disadvantages without using LINQ or EDM.

Posted one year ago

Hi nagaraju60,

In LINQ to SQL, the data model of a relational database is mapped to an object model expressed in the programming language of the developer.

When the application runs LINQ to SQL translates into SQL queries in the object model and sends them to the database for execution.

When the database returns the results LINQ to SQL translates them back to objects that you can work with in your own programming language.

Advantages LINQ to SQL:

  • No magic strings like you have in SQL queries
  • Intellisense
  • Compile check when database changes
  • Faster development
  • Unit of work pattern (context)
  • Auto-generated domain objects that are usable small projects
  • Lazy loading

Refer below link for more details.