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