Esempio n. 1
0
        public async Task<Bicycle> Create(BicycleApiModel model)
        {
            Bicycle bicycle = mapper.Map<BicycleApiModel, Bicycle>(model);
            bicycle.Id = Guid.NewGuid();

            return await bicycleService.Add(bicycle);
        }
Esempio n. 2
0
        public async Task <IActionResult> Add([FromBody] AddBicycleView model)
        {
            await _bicycleService.Add(model);

            return(Ok());
        }