Пример #1
0
        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));
            }
        }
Пример #2
0
        public async Task <ActionResult> Edit(GenderDto gender)
        {
            await _genderAppService.Update(gender);

            return(RedirectToAction("Index"));
        }