public bool Update(ProKindNew prokind) { { Func <bool> func = new Func <bool>(() => { _entity.Entry(prokind).State = EntityState.Modified; _entity.SaveChanges(); return(true); }); return(_adapter.Catch <bool>(func)); } }
public bool Insert(ProKindNew pro_kind) { { Func <bool> func = new Func <bool>(() => { _entity.Entry(pro_kind).State = EntityState.Added; try { _entity.SaveChanges(); } catch (Exception ex) { throw new Exception(ex.Message); } return(true); }); return(_adapter.Catch <bool>(func)); } }