public async Task <Ingridient> CreateIngridient(Ingridient ingridient) { if (ingridient.Kcal < 0) { throw new EntityException("Field 'kcal' of ingridient can't be less than 0"); } if (string.IsNullOrEmpty(ingridient.Name)) { throw new EntityException("Field 'name' of ingridient can't be null or empty"); } return(await _ingridientRepository.CreateIngridient(ingridient)); }