Example #1
0
        public async Task <SampleServiceObject> CreateSampleAsync(SampleServiceObject sampleobject, CancellationToken token)
        {
            await _saveSampleValidationService.Validate(sampleobject, token);

            var sampleEntity  = _mapper.Map <SampleEntity>(sampleobject);
            var createdEntity = await _sampleRepository.CreateSampleAsync(sampleEntity, token);

            return(_mapper.Map <SampleServiceObject>(createdEntity));
        }