public bool deleteObject(Models.Object obj) { try { using (var context = new ArchaeologyContext()) { context.Remove(obj); context.SaveChanges(); } } catch (Exception ex) { throw new Exception(ex.Message, ex.InnerException); } return(true); }
public bool deleteArea(Area area) { try { using (var context = new ArchaeologyContext()) { context.Remove(area); context.SaveChanges(); } } catch (Exception ex) { throw new Exception(ex.Message, ex.InnerException); } return(true); }
public bool deletePotteryBucket(PotteryBucket potteryBucket) { try { using (var context = new ArchaeologyContext()) { context.Remove(potteryBucket); context.SaveChanges(); } } catch (Exception ex) { throw new Exception(ex.Message, ex.InnerException); } return(true); }