private GroupFilterRepository() { EndSaveCallback = (obj) => { lock (Types) { lock (Changes) { Types[obj.GroupFilterID] = obj.Types; Changes.AddOrUpdate(obj.GroupFilterID); } } }; EndDeleteCallback = (obj) => { lock (Types) { lock (Changes) { Types.Remove(obj.GroupFilterID); Changes.Remove(obj.GroupFilterID); } } }; }
internal override void EndDelete(SVR_GroupFilter entity, object returnFromBeginDelete, bool onlyconditions) { lock (Types) { lock (Changes) { Types.Remove(entity.GroupFilterID); Changes.Remove(entity.GroupFilterID); } } }
public GroupFilterRepository() { EndSaveCallback = obj => { Types[obj.GroupFilterID] = obj.Types; Changes.AddOrUpdate(obj.GroupFilterID); }; EndDeleteCallback = obj => { Types.Remove(obj.GroupFilterID); Changes.Remove(obj.GroupFilterID); }; }
public void Delete(int id) { using (var session = JMMService.SessionFactory.OpenSession()) { // populate the database using (var transaction = session.BeginTransaction()) { GroupFilter cr = GetByID(id); if (cr != null) { Cache.Remove(cr); Changes.Remove(cr.GroupFilterID); Types.Remove(cr.GroupFilterID); session.Delete(cr); transaction.Commit(); } } } }