public async Task <ActionResult <ClassTypeViewModel> > Update(ClassTypeViewModel classType) { var response = await _classTypeService.Update(classType.ToModel()); if (response != BusinessLogic.Enums.StatusCode.Updated) { _logger.LogError($"ClassType {classType.Name} not Updated."); } return(response == BusinessLogic.Enums.StatusCode.Created ? (ActionResult <ClassTypeViewModel>)Ok() : Conflict()); }
public async Task <ActionResponse <ClassTypeDto> > Update([FromBody] ClassTypeDto classType) { return(await classTypeService.Update(classType)); }