Example #1
0
        public async Task <StateApplicantDto> CreateStateApplicantAsync(CreateStateApplicantDto input)
        {
            var stateApplicant = ObjectMapper.Map <StateApplicant>(input);

            stateApplicant = await _stateApplicantRepo.InsertAsync(stateApplicant);

            await CurrentUnitOfWork.SaveChangesAsync();

            return(ObjectMapper.Map <StateApplicantDto>(stateApplicant));
        }
        public async Task <IActionResult> Create(CreateStateApplicantDto input)
        {
            var newStateApplicant = await _stateApplicantAppService.CreateStateApplicantAsync(input);

            return(CreatedAtRoute("GetStateApplicant", new { id = newStateApplicant.Id }, newStateApplicant));
        }