public async Task <IActionResult> DeleteGroup(int id) { if (id <= 0) { return(BadRequest()); } var groupDto = await _groupService.GetGroupByIdAsync(id); if (groupDto == null) { return(NotFound()); } await _groupService.DeleteGroupAsync(groupDto); return(NoContent()); }
private async void OnDeleteGroup(Group group) { if (_accessUtility.HasAccess(23)) { if (Deleting()) { try { await _groupsService.DeleteGroupAsync(group.GroupId); Groups.Remove(group); Deleted(); } catch (Exception ex) { Failed(ex); } } } }
public async Task <IActionResult> DeleteGroup(long groupId) { await _groupsService.DeleteGroupAsync(groupId); return(NoContent()); }