public async Task <IActionResult> Edit([FromBody] UserRoleModel model) { if (!ModelState.IsValid) { return(BadRequest(ModelState.GetErrorList())); } try { await _manager.EditAsync(model); } catch (Exception ex) { return(BadRequest(ex.Message)); } return(Ok()); }