public Int32 SaveUserGroup(UserGroupDTO userGroup)
        {
            Int32 id;
            if (userGroup.Id == 0)
            {
                id = _unitOfWork.UserGroupRepository.Create(new UserGroup()
                {
                    Name = userGroup.Name,
                    Points = userGroup.Points
                }).Id;
            }
            else
            {
                var ug = _unitOfWork.UserGroupRepository.Read().Where(x => x.Id == userGroup.Id).FirstOrDefault();
                ug.Name = userGroup.Name;
                ug.Points = userGroup.Points;
                id = ug.Id;

                _unitOfWork.UserGroupRepository.Update(ug);
            }
            _unitOfWork.SaveChanges();
            return id;
        }
 public Int32 SaveUserGroup(UserGroupDTO userGroup)
 {
     return _userGroupManager.SaveUserGroup(userGroup);
 }