public async Task <ActionResult> Put(int id, MaterialTypeUpsertDto materialTypeUpsertDto) { await _materialTypeService.UpdateMaterialType(id, materialTypeUpsertDto); _logger.LogInformation(LogMessages.EntityUpdated); return(Ok()); }
public ActionResult AddOrUpdate(MaterialTypeViewModel entity) { if (ModelState.IsValid) { if (entity.Id.HasValue) { TempData["result"] = materialTypeService.UpdateMaterialType(entity); } else { TempData["result"] = materialTypeService.AddMaterialType(entity); } } return(View()); }