public async Task <ActionResult> DeleteGroupConfirmed(string groupId) { var deleteGroup = await GroupManager.FindByIdAsync(groupId); await GroupManager.DeleteAsync(deleteGroup); return(RedirectToAction("GroupList")); }
public async Task <ActionResult> RemoveGroup(int groupId) { ViewBag.GorupId = groupId; // Checking if the groupsets are still up to date await GroupManager.DeleteAsync(groupId); // Returns to the group view return(RedirectToAction("Groups")); }
public async Task <ResultEntity> DeleteByIdAsync(int id, int userId) { var result = await _groupManager.DeleteAsync(id); if (result.Success) { await _unitOfWork.CommitAsync(); await _logManager.LogInfomationAsync(EnumLogType.Audit, LogTitleConstString.GroupDelete, $"【{result.Data.Name}】已删除", JsonConvert.SerializeObject(result.Data), userId); } return(result); }