Entity Framework

Serializing Objects in ASP.Net WebForms

This is a very incomplete post with some quick & dirty notes about serializing objects in ASP.Net WebForms. All included code is VB.Net. Default ASP.Net serialization Classes must have annotation [...]

2019-09-10T14:25:17-03:00September 10th, 2019|

Why Repository Pattern with Entity Framework Is No Longer Necessary

When building applications with ASP.Net Core and Entity Framework, Microsoft often recommends in their official training (including course 20486D) that developers use the Repository Pattern to further abstract Entity Framework. [...]

2019-08-27T12:03:54-03:00August 27th, 2019|

Add New Entity (or Copy Entity) with Entity Framework

To add a new entity to your model, simply add it using <context>.<models>.Add(newEntity) and then call <context>.SaveChanges(). If you want to copy an existing entity and insert the copied item [...]

2019-03-08T10:06:18-04:00March 8th, 2019|

Relationships in Entity Framework 6

This demonstrates how to configure one-to-many and many-to-many relationships in a code-first Entity Framework ASP.Net MVC application. The sample application is a blog containing posts, post categories (one-to-many), and post [...]

2020-10-16T19:00:52-03:00February 22nd, 2019|

Selecting Data with Entity Framework

Preface Please see Entity Framework Select Functions Explained for an overview of each available select method. This post only covers a handful of them. Selecting Single Record by Primary Key [...]

2019-02-11T12:06:44-04:00February 7th, 2019|
Go to Top