Twitter

Tag: entity-framework-6

One of the projects I’ve spent the past month working on is a system called Foundation that will eventually become the company’s one stop shop for automation and workflow management. It’ll keep track of everything from services to environments, and the resources they are using underneath in our private cloud and public cloud provider.

In the process of learning Code First Entity Framework for the first time (all previous provides were Data First), I came across an interesting event that you could use to prepare entities before they are committed to the database. For example, you have some entity properties that need to be checked at last minute and possibly changed. You could do the following without having to layer in an abstract DbContextBase between your own context implementation and DbContext that overrides SaveChanges() to perform the same work before calling the same method off the base class…Continue reading