public async Task <IActionResult> UpdatePrint(QrPrintDto entity) { if (await _ingredientService.UpdatePrint(entity)) { return(NoContent()); } return(BadRequest($"Updating brand {entity.ID} failed on save")); }
public async Task <bool> UpdatePrint(QrPrintDto entity) { var model = await _repoIngredient.FindAll().FirstOrDefaultAsync(x => x.ID == entity.ID); if (model != null) { model.ManufacturingDate = entity.ManufacturingDate; return(await _repoIngredient.SaveAll()); } else { return(false); } }