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); }
public void Actualizar(PrecioIngrediente precioIngrediente) { modelo.PreciosIngredientes.Attach(precioIngrediente); modelo.Entry(precioIngrediente).State = EntityState.Modified; }
public void Crear(PrecioIngrediente precioIngrediente) { modelo.PreciosIngredientes.Add(precioIngrediente); }