public bool Insert(SolutionNew product) { Func <bool> func = new Func <bool>(() => { _entity.SolutionNew.Add(product); _entity.SaveChanges(); return(true); }); return(_adapter.Catch <bool>(func)); }
public bool Insert(ProductNew product) { { Func <bool> func = new Func <bool>(() => { _entity.Entry(product).State = EntityState.Added; _entity.SaveChanges(); return(true); }); return(_adapter.Catch <bool>(func)); } }
public bool Insert(CarouselNew carousel) { { Func <bool> func = new Func <bool>(() => { _entity.Entry(carousel).State = EntityState.Added; _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)); } }
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)); } }
public bool Insert(SolutionKindNew solution_kind) { // { Func <bool> func = new Func <bool>(() => { // _entity.SolutionKindNew.Add(solution_kind); _entity.SaveChanges(); return(true); }); return(_adapter.Catch <bool>(func)); } }