/// inheritedDoc
        public async Task <ConfigurableComponentDto> CreateAsync(ConfigurableComponentDto dto)
        {
            var component = ObjectMapper.Map <ConfigurableComponent>(dto);
            await _componentRepository.InsertAsync(component);

            return(ObjectMapper.Map <ConfigurableComponentDto>(component));
        }
        /// inheritedDoc
        public async Task <ConfigurableComponentDto> UpdateAsync(ConfigurableComponentDto dto)
        {
            var component = await _componentRepository.GetAsync(dto.Id);

            ObjectMapper.Map(dto, component);
            await _componentRepository.UpdateAsync(component);

            return(ObjectMapper.Map <ConfigurableComponentDto>(component));
        }
예제 #3
0
        public async Task <ConfigurableComponentDto> CreateAsync(ConfigurableComponentDto dto)
        {
            var result = await _componentStore.CreateAsync(dto);

            return(result);
        }
예제 #4
0
 public async Task <ConfigurableComponentDto> UpdateAsync(ConfigurableComponentDto dto)
 {
     return(await _componentStore.UpdateAsync(dto));
 }