I'm using Microsoft Fakes and I have tried to shim the object DBEntityEntry with System.Data.Entity.Infrastructure.Fakes.ShimDbEntityEntry but when I try to tell the shim to return a DbEntry object I can't because the DbEntry constructor is internal. What do I have to do to return a new DbEntry or just don't do nothing.
System.Data.Entity.
Infrastructure.Fakes
.ShimDbEntityEntry<RequisitionDetail>
.AllInstances.EntityGet = m => { DbEntityEntry<RequisitionDetail> r; };
I've tried to return null but when I try to change its state I get a null reference.
db.Entry(obj).State = EntityState.Modified;
How to isolate that dependency?