public async Task <IActionResult> Post([FromBody] StationInput input)
        {
            var station = await _stationDomainService
                          .InsertAsync(input)
                          .ConfigureAwait(false);

            return(Created("", station));
        }
Esempio n. 2
0
        public async Task <Station> InsertAsync(StationInput input)
        {
            var station = new Station()
            {
                Name    = input.Name,
                Address = input.Address,
                Phone   = input.Phone
            };

            await _stationRepository.InsertAsync(station).ConfigureAwait(false);

            return(station);
        }