Esempio n. 1
0
        public async Task <ExampleResource> CreateExample(ExampleResource resource)
        {
            ExampleModel example    = _mapper.Map <ExampleResource, ExampleModel>(resource);
            ExampleModel newExample = await _repository.CreateExample(example);

            ExampleResource newResource = _mapper.Map <ExampleModel, ExampleResource>(newExample);

            return(newResource);
        }
Esempio n. 2
0
        public Example CreateExample(Example example)
        {
            var created = _exampleRepository.CreateExample(example);

            return(created);
        }