Ejemplo n.º 1
0
 public ApplicationGroup Add(ApplicationGroup appGroup)
 {
     if (_appGroupRepository.CheckContains(x => x.Name == appGroup.Name))
     {
         throw new Exception("Tên không được trùng");
     }
     return(_appGroupRepository.Add(appGroup));
 }
Ejemplo n.º 2
0
 public async Task <ApplicationGroup> Add(ApplicationGroup appGroup)
 {
     if (await _appGroupRepository.CheckContains(x => x.Name == appGroup.Name))
     {
         throw new NameDuplicatedException("Tên không được trùng");
     }
     return(_appGroupRepository.Add(appGroup));
 }
Ejemplo n.º 3
0
 public ApplicationGroup Add(ApplicationGroup appGroup)
 {
     if (_applicationGroupRepository.CheckContain(x => x.Name == appGroup.Name))
     {
         throw new NameDuplicateException("lỗi trùng tên nhóm");
     }
     return(_applicationGroupRepository.Add(appGroup));
 }
Ejemplo n.º 4
0
        public ApplicationGroup Add(ApplicationGroup appGroup)
        {
            if (_appGroupRepository.CheckContains(x => x.Name == appGroup.Name))
            {
                throw new NameDuplicatedException("Tên không được trùng.");
            }

            return(_appGroupRepository.Add(appGroup));
        }