public async Task <DocumentUpdateResultDto> CreateAsync(ConfigurationSettingDto configurationSettingDto) { await ValidateConfigurationSettingAsync(configurationSettingDto); ConfigurationSetting configurationSetting = new ConfigurationSetting(); AssignConfigurationDtoToEntity(configurationSetting, configurationSettingDto); return(await _dataContext.CreateDocumentAsync(configurationSetting)); }
public async Task <DocumentUpdateResultDto> CreateAsync(LocalisationTextDto localisationTextDto) { await CheckForDuplicates(localisationTextDto); LocalisationText localisationText = new LocalisationText(); AssignLocalisationDtoToEntity(localisationText, localisationTextDto); return(await _dataContext.CreateDocumentAsync(localisationText)); }
public async Task <DocumentUpdateResultDto> CreateAsync(AlertTemplateDto dto) { ValidateDto(dto); await CheckForDuplicatesAsync(dto); AlertTemplate alertTemplate = new AlertTemplate(); AssignDtoToEntity(alertTemplate, dto); return(await _dataContext.CreateDocumentAsync(alertTemplate)); }
public async Task <DocumentUpdateResultDto> CreateAsync(PermissionConfigDto dto) { await CheckForDuplicates(dto.Role); var permissionConfig = new PermissionConfig { Role = dto.Role, Permissions = dto.Permissions ?? new List <string>() }; var result = await _dataContext.CreateDocumentAsync(permissionConfig); await SendRoleUpdateMessageAsync(dto); return(result); }
public async Task <DocumentUpdateResultDto> CreateAsync(LookupDto dto) { await CheckForDuplicates(dto.GroupId, dto.Culture, dto.Section, dto.Key); if (dto.Items != null) { CheckForCircularReference(dto.Key, dto.Items); } var lookup = new Lookup { Culture = dto.Culture, Section = dto.Section, Key = dto.Key, IncludeInPod = dto.IncludeInPod, Priority = ConfigurationHelper.GetConfigurationPriority(dto.GroupId, dto.Culture, dto.Section), Items = CreateLookupItems(dto.Items), }; var result = await _dataContext.CreateDocumentAsync(lookup); return(result); }