예제 #1
0
        public async Task <OrientationDto> CreateOrientationAsync(CreateOrientationDto input)
        {
            var orientation = ObjectMapper.Map <Orientation>(input);

            orientation = await _orientationRepo.InsertAsync(orientation);

            await CurrentUnitOfWork.SaveChangesAsync();

            return(ObjectMapper.Map <OrientationDto>(orientation));
        }
예제 #2
0
        public async Task <IActionResult> Create(CreateOrientationDto input)
        {
            var newOrientation = await _orientationAppService.CreateOrientationAsync(input);

            return(CreatedAtRoute("GetOrientation", new { id = newOrientation.Id }, newOrientation));
        }