Esempio n. 1
0
        public async Task <StateApplicationDto> CreateStateApplicationAsync(CreateStateApplicationDto input)
        {
            var stateApplication = ObjectMapper.Map <StateApplication>(input);

            stateApplication = await _stateApplicationRepo.InsertAsync(stateApplication);

            await CurrentUnitOfWork.SaveChangesAsync();

            return(ObjectMapper.Map <StateApplicationDto>(stateApplication));
        }
        public async Task <IActionResult> Create(CreateStateApplicationDto input)
        {
            var newStateApplication = await _stateApplicationAppService.CreateStateApplicationAsync(input);

            return(CreatedAtRoute("GetStateApplication", new { id = newStateApplication.Id }, newStateApplication));
        }