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)); }
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)); }
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)); }
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)); }