public void AddDetaliiComandaPentruComannda(DetaliiComanda detaliiComanda)
 {
     if (detaliiComanda == null)
     {
         return;
     }
     Context.DetaliiComandas.Add(detaliiComanda);
     Context.SaveChanges();
 }
Ejemplo n.º 2
0
 public void Add(Operatie operatie)
 {
     if (operatie == null)
     {
         return;
     }
     Context.Operaties.Add(operatie);
     Context.SaveChanges();
 }
Ejemplo n.º 3
0
 public void Add(Imagine imagine)
 {
     if (imagine == null)
     {
         return;
     }
     Context.Imagines.Add(imagine);
     Context.SaveChanges();
 }
Ejemplo n.º 4
0
 public void Add(Mecanic mecanic)
 {
     if (mecanic == null)
     {
         return;
     }
     Context.Mecanics.Add(mecanic);
     Context.SaveChanges();
 }
Ejemplo n.º 5
0
 public void Add(Automobil auto)
 {
     if (auto == null)
     {
         return;
     }
     Context.Automobils.Add(auto);
     Context.SaveChanges();
 }
Ejemplo n.º 6
0
 public void Add(Material material)
 {
     if (material == null)
     {
         return;
     }
     Context.Materials.Add(material);
     Context.SaveChanges();
 }
Ejemplo n.º 7
0
 public void Add(Client client)
 {
     if (client == null)
     {
         return;
     }
     Context.Clients.Add(client);
     Context.SaveChanges();
 }
Ejemplo n.º 8
0
        public Comanda Add(Comanda comanda)
        {
            if (comanda == null)
            {
                return(null);
            }
            var comandaGasita = Context.Comandas.FirstOrDefault(c => c.ComandaId == comanda.ComandaId);

            if (comandaGasita != null)
            {
                return(null);
            }
            Context.Comandas.Add(comanda);
            Context.SaveChanges();
            return(comanda);
        }