public List <PR0200> Reads(Expression <Func <PR0200, bool> > predicate) { using (var context = new ProductRepresentContext()) { return (context.PR0200s.Where(predicate).ToList()); } }
public List <PR0200> Reads() { using (var context = new ProductRepresentContext()) { return (context.PR0200s.ToList()); } }
public PR0200 Read(Expression <Func <PR0200, bool> > predicate) { using (var context = new ProductRepresentContext()) { return (context.PR0200s.FirstOrDefault(predicate)); } }
public bool Exist(Expression <Func <PR0200, bool> > predicate) { using (var context = new ProductRepresentContext()) { return (context.PR0200s.Any(predicate)); } }
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); } }