private void DropExecutions() { using (var repo = new NHGetAllRepository <EventExecution>()) { repo.Delete(x => x.Event == null); } }
public static Y GetAnotherEntity <Y>(long id) where Y : Entity { using (var repo = new NHGetAllRepository <Y>()) { return(repo.Get(id)); } }
private void DropPurchases() { using (var repo = new NHGetAllRepository <Purchase>()) { repo.Delete(x => x.Event == null); } }
public static IEnumerable <Y> GetAnotherEntity <Y>(IEnumerable <long> ids) where Y : Entity { using (var repo = new NHGetAllRepository <Y>()) { return(repo.GetAll(ids)); } }
public void Delete(long id) { using (var repo = new NHGetAllRepository <EventExecution>()) { repo.Delete(x => x.Event.Id == id); } base.Delete(id); }