public DbEntityEntry<Profile> Entry(Profile entity) { HttpContext.Current.Cache.Remove("Profiles"); // invalidate cache return db.Entry<Profile>(entity); }
public Profile Remove(Profile entity) { HttpContext.Current.Cache.Remove("Profiles"); // invalidate cache Entry(entity).State = System.Data.EntityState.Deleted; return entity; }
public Profile Add(Profile entity) { HttpContext.Current.Cache.Remove("Profiles"); // invalidate cache return db.Profiles.Add(entity); }