public IHttpActionResult UpdateGender(GenderModel genderModel) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } try { var genderDto = Mapper.Map <GenderDto>(genderModel); _genderAppService.Update(genderDto, AuthHelper.GetCurrentUserId()); return(Ok("Gender Updated")); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public async Task <ActionResult> Edit(GenderDto gender) { await _genderAppService.Update(gender); return(RedirectToAction("Index")); }