public void CreateType(TypeBM model) { TypeOfWaybill element = context.TypeOfWaybills.FirstOrDefault(rec => rec.Type == model.Type); if (element != null) { throw new Exception("Уже есть type с таким name"); } context.TypeOfWaybills.Add(new TypeOfWaybill { Type = model.Type }); context.SaveChanges(); }
public void UpdType(TypeBM model) { throw new NotImplementedException(); }