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 (_appGroupRepository.CheckContains(x => x.Name == appGroup.Name)) { throw new NameDuplicatedException("Tên không được trùng."); } return(_appGroupRepository.Add(appGroup)); }