How to do unit testing with EF 4.2

0 Comments

If you want to do unit testing with Entity Framework 4.2, I suggest you read this article: http://romiller.com/2010/09/07/ef-ctp4-tips-tricks-testing-with-fake-dbcontext/ It explains how to create a Interface for you DbContext and create fake implementations for the IDbSet,

How to use SaveOptions.None with DbContext in EF 4.2

0 Comments

If you want to use the SaveOptions.None, when calling the method DbContext.SaveChanges, you must override de function in a partial class, like:   /// <summary> /// </summary> public partial class MyEntities : IMyEntities { ///