public bool Update(NewsKindNew 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(NewsKindNew pro_kind) { { Func <bool> func = new Func <bool>(() => { _entity.NewsKindNew.Add(pro_kind); try { _entity.SaveChanges(); } catch (Exception ex) { throw new Exception(ex.Message); } return(true); }); return(_adapter.Catch <bool>(func)); } }