Tag: Entity Framework
How to Quickly Delete All Rows in a Table in Entity Framework?
There are times when you would be required to delete all the records from the table using Entity Framework. One of the commonly used approach is to iterate each rows and use the DBSet.Table.Remove as shown below. How to Quickly Delete All Rows in a Table in Entity Framework? The Other quickest simple option to delete all the rows in a table in entity framework…
How to Ignore a Class Property in Entity Framework ?
If you want to ignore a class property in Entity Framework , you can mark the property with the NotMapped data annotations. How to Ignore a Class Property in Entity Framework ? Below is a sample code snippet show how you can apply the NotMapped data annotations.
How to Convert DBContext Object to ObjectContext in C# ?
Below is a function that converts the DBContext object to ObjectContext in C#. How to Convert DBContext Object to ObjectContext in C# ?