Category Archives for Entity Framework

Introducing Foreign Key Constraint May Cause Cycles Or Multiple Cascade Paths

Introducing Foreign Key Constraint May Cause Cycles Or Multiple Cascade Paths “Introducing Foreign Key Constraint May Cause Cycles Or Multiple Cascade Paths” may be a message you have seen before when using Entity Framework. The error message is thrown when … Continue reading

03. September 2014 by Adam Riddick
Categories: Databases, Entity Framework | Leave a comment

ASP MVC4 Entity Framework – Handling Concurrency

Concurrency conflicts occur when we have a situation in which one of our users retrieves an entity from the database in order to edit it, but before their changes are persisted another user updates that entity and persists it first. … Continue reading

26. June 2013 by Adam Riddick
Categories: ASP.Net, Entity Framework | Leave a comment

ASP.Net MVC4 EF5 – A Simple Repository Pattern Example

The Repository pattern and the Unit Of Work pattern are intended to introduce a layer of abstraction between the Data Access layer and the Business Logic layer of an application. They are intended as a service layer. Within this simple … Continue reading

10. May 2013 by Adam Riddick
Categories: ASP.Net, Entity Framework | 1 comment

ASP.Net MVC4 – Eager-Load with Entity Framework Code First

There is always a legitimate situation using entity framework and asp.net MVC when you require all relationships to be loaded using eager-load. But at the same time there are occurrences within the application where using eager-load is a waste of … Continue reading

09. April 2013 by Adam Riddick
Categories: ASP.Net, Entity Framework | Leave a comment

Entity Framework Tip #1 – MaxLength Attribute

C# provides a in-built mechanism for declaring and using tags on properties, methods etc. Using reflection, at run time the information held by these attributes can be retrieved. Entity Framework manipulates attributes, and sets a certain amount of its own … Continue reading

03. March 2013 by Adam Riddick
Categories: Entity Framework, Tips | Leave a comment