public async Task <IActionResult> CreateUserRolesAsync(UserRolesEntity userRole) { if (_userRolesService.CheckIfNewUserRoleExist(userRole)) { var model = await _userRolesService.CreateUserRolesAsync(userRole); var location = _linkGanarator.GetPathByAction("GetUserRolesByIdAsync", "Users", new { userRoleId = model.UserRoleId }); return(Created(location, model)); } else { return(BadRequest("user Role has already been created")); } }