public async Task <IHttpActionResult> RemoveFromRole(string userId, string roleId) { if (userId == null || roleId == null) { return(BadRequest()); } var removeResult = await _roleManager.RemoveFromRole(userId, roleId); return(removeResult.Succeeded ? Ok() : (IHttpActionResult)NotFound()); }
public async Task <IHttpActionResult> RemoveFromRole(string userId, string roleId) { if (string.IsNullOrWhiteSpace(userId) || string.IsNullOrWhiteSpace(roleId)) { return(BadRequest("Incorrect input data value")); } var removeResult = await _roleManager.RemoveFromRole(userId, roleId); return(removeResult.Succeeded ? Ok() : (IHttpActionResult)NotFound()); }