Insert Update & Delete using Linq to sql classes
I have learnt last week Linq to sql and i amazed by its features.I would like to share my knowledge with you.To insert,update and delete you need to write lesser amount of code hence it saves development time. Following is the step you need to follow in order to insert,update and delete data of database using Linq to sql in Asp.Net. Open Visual Studio 2008, Click File >Website and choose ASP.Net Website. Choose the language of your choice and name your website according to your need. In solution explorer, right the project and select “Add New Item”. Select “LINQ to SQL classes” as shown in below figure. I have named it as DataClasses1. This will add an EmployeeInfo.dbml file inside “App_Code” folder. In Visual Studio, DataClasses1.dbml will have 2 panes. The left pane is for deigning the data objects and the right pane can be used for creating methods that operates on the data objects.The Visual Studio toolbar will contain a new toolbar for designing LINQ to SQL obje