public async Task<Bicycle> Create(BicycleApiModel model) { Bicycle bicycle = mapper.Map<BicycleApiModel, Bicycle>(model); bicycle.Id = Guid.NewGuid(); return await bicycleService.Add(bicycle); }
public async Task <IActionResult> Add([FromBody] AddBicycleView model) { await _bicycleService.Add(model); return(Ok()); }