public bool Delete(PR0200 entity) { using (var context = new ProductRepresentContext()) { context.PR0200s.Remove(entity); return (context.SaveChanges() == 1); } }
public bool Create(PR0100 entity) { using (var context = new ProductRepresentContext()) { context.PR0100s.Add(entity); return (context.SaveChanges() == 1); } }
public bool Update(Expression <Func <PR0200, bool> > predicate) { using (var context = new ProductRepresentContext()) { context.PR0200s .UpdateRange(context.PR0200s .Where(predicate)); return (context.SaveChanges() == 1); } }