Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
 public void UpdType(TypeBM model)
 {
     throw new NotImplementedException();
 }