public bool Delete(owners obj) { EDM edm = new EDM(); edm.Entry(obj).State = System.Data.Entity.EntityState.Deleted; try { edm.SaveChanges(); return(true); } catch (Exception ex) { throw ex; } }
public Int32 Create(owners obj) { EDM edm = new EDM(); edm.owners.Add(obj); try { edm.SaveChanges(); return(obj.id); } catch (Exception ex) { throw ex; } }