public void CreateProdGroup(ProductGroupBM model) { ProdGroup element = context.ProdGroups.FirstOrDefault(rec => rec.Name == model.Name); if (element != null) { throw new Exception("Уже есть группа с таким name"); } context.ProdGroups.Add(new ProdGroup { Name = model.Name, Norm = model.Norm }); context.SaveChanges(); }
public void UpdProdGroup(ProductGroupBM model) { throw new NotImplementedException(); }