Esempio n. 1
0
        public PrecioIngrediente Obtener(Ingrediente ingrediente)
        {
            PrecioIngrediente resultado = null;

            foreach (PrecioIngrediente precioIngrediente in modelo.PreciosIngredientes)
            {
                if (precioIngrediente.Ingrediente.Nombre == ingrediente.Nombre)
                {
                    resultado = precioIngrediente;
                    break;
                }
            }

            return(resultado);
        }
Esempio n. 2
0
 public void Actualizar(PrecioIngrediente precioIngrediente)
 {
     modelo.PreciosIngredientes.Attach(precioIngrediente);
     modelo.Entry(precioIngrediente).State = EntityState.Modified;
 }
Esempio n. 3
0
 public void Crear(PrecioIngrediente precioIngrediente)
 {
     modelo.PreciosIngredientes.Add(precioIngrediente);
 }