private List <Ingridient> getAlergens(string alergensIdsText) { List <Ingridient> result = new List <Ingridient>(); if (alergensIdsText.Equals("")) { return(result); } foreach (string alergenId in alergensIdsText.Split(' ')) { result.Add(IngridientRepository.GetInstance().Read(uint.Parse(alergenId))); } return(result); }
public Ingridient AddIngridient(Ingridient ingridient) { return(IngridientRepository.GetInstance().Create(ingridient)); }