Category: Entity Framework
-
Ignore class property to table column in Entity Framework Code First
There are times when you don’t want to map a property in a class to the table column in Entity Framework Code First. Let us consider the following Customer Model class In this Customer model class, we have a property by Name “FullName” . We would use this property to display the complete name of…
-
Calling Stored Procedure from Entity Framework 6 Code First
You don’t want Entity Framework to execute plain SQL queries when inserting/updating data into database when using Code First. Instead, you would like to call Stored Procedures. Let us see first what the existing behavior is when saving information to the database and how we can make Entity Framework to use Stored Procedures instead of…
-
LINQ – Basics
Linear INtegrated Query (LINQ) is a set of .Net libraries which gives querying capabilities on local and remote data sources. The data sources can be local such as collection, list, xml or remote such as databases. In this article, I am going to discuss only about LINQ with local data sources. Before looking into the…
-
Using Entity Framework Code First approach on existing databases
Most developers prefer Code First style when they use entity framework in their applications. This approach was being primarily used for new applications as it would be difficult to code all the classes for the respective tables when dealing with existing database with lots of tables. But with the advent of Entity framework power tools,…