public Emergency Add(Emergency entity) { if (entity.Id > 0) return entity; context.Emergency.AddObject(entity); try { context.SaveChanges(); } catch (OptimisticConcurrencyException e) { //An optimistic concurrency violation has occurred in the data source. throw new ConcurrencyException(e.Message); } return entity; }
public void Delete(Emergency entity) { context.DeleteObject(entity); }
public Emergency Update(Emergency entity) { return entity; }