public IActionResult DeleteUserGroup([FromQuery] int groupId) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _ugService.DeleteUserGroup(groupId, User.Identity.Name); return(Ok()); }
public async Task <ActionResult> Delete(string userGroupId, GroupUserModel groupUserModel) { try { string accessToken = Session["MicrosoftAccessToken"] as string; var userGroupService = new UserGroupService(accessToken); var userGroup = await userGroupService.GetUserGroupById(userGroupId); await userGroupService.DeleteUserGroup(userGroup.Id); return(RedirectToAction("Index", new { groupId = userGroup.GroupId })); } catch { return(View()); } }
public OperationResult DeleteUserGroup(long userGroupId) { return(userGroupService.DeleteUserGroup(userGroupId)); }