Exemple #1
0
        public async Task <IActionResult> UpdatePrint(QrPrintDto entity)
        {
            if (await _ingredientService.UpdatePrint(entity))
            {
                return(NoContent());
            }

            return(BadRequest($"Updating brand {entity.ID} failed on save"));
        }
Exemple #2
0
        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);
            }
        }