Tag Archives: entityframework

Duplicate Key Exception

Entity Framework throws exceptions from the DbContext’s SaveChanges method if there is a constraint violation in the database. If you have a property marked as invariant w.r.t. concurrency, that too will raise an exception at this point (a DbUpdateConcurrencyException Exception. … Continue reading

Posted in EF | Tagged , , , | Leave a comment

Glimpse

That turned out to be a profitable search. A bug that suggested that there was a routing configuration issue in a .Net MVC app. I was looking for a way to troubleshoot the issue and I came across this: Glimpse … Continue reading

Posted in C# | Tagged , , , | Leave a comment

EntityFramework DbContext Template Namespaces

I seem to be seeing something odd in EF. I have a working project that has a data model (.edmx) that was built from the database, with code generated using the DbContext template. The object model was thenĀ editedĀ (introduction of inheritance, … Continue reading

Posted in EF | Tagged , | Leave a comment