I am new to Entity Framework.
I have get to some values in my database using EF. It returns perfectly, and the values are shown in labels. But When I delete all valu
I think you should follow some of the other solutions here, but it seems like you're wanting to clear the cache. You can achieve this by doing the following:
var count = datamodel.Compliances.Local.Count; // number of items in cache (ex. 30)
datamodel.Compliances.Local.ToList().ForEach(c => {
datamodel.Entry(c).State = EntityState.Detached;
});
count = datamodel.Compliances.Local.Count; // 0