public async Task <IResult> Handle(DeleteUserGroupCommand request, CancellationToken cancellationToken) { var entityToDelete = await _userGroupDal.GetAsync(x => x.Id == request.Id); await _userGroupDal.DeleteAsync(entityToDelete); return(new SuccessResult(Messages.UserGroupDeleted)); }