Beispiel #1
0
        public async Task <WindowSettingsDto> UpdateWindowSettingsAsync(WindowSettingsDto model)
        {
            var windowSettings = await _windowSettingsRepository.GetItemByIdAsync(model.Id);

            if (windowSettings == null)
            {
                throw new EliseException(400, "Doesn't exist in system.");
            }
            var windowSettingsEntity = await _windowSettingsRepository.UpdateAsync(model.ToCommand());

            return(windowSettingsEntity.ToQueries());
        }
Beispiel #2
0
        public async Task <WindowSettingsDto> CreateWindowSettingsAsync(WindowSettingsDto model)
        {
            var windowSettingsEntity = await _windowSettingsRepository.AddAsync(model.ToCommand());

            return(windowSettingsEntity.ToQueries());
        }