LINQ to SQL automatically produces SQL statements to CRUD operations. Sometimes it may be preferable to use stored procedures to access data in order to improve application performance, guarantee security and inject some business logic.
Querying a database using Linq follows the same rules as querying in-memory objects (Linq To Objects): the only difference is that the database context object must be instantiated.
A Linq To SQL component can be added to a project following one of the step below: Visual Studio Designer using Linq attributes (.dbml file) Generate code and mappings (.xml file) / Linq attributes (.dbml file) through the SQLMetal.exe tool … Continue reading
Data model classes are normally definied following the strategy one classe-one table. An aternative strategy of modeling is to have an entity classes inheritance to be saved on the same table: a discriminator table column indicates what class type each … Continue reading