// POST: api/Checkin public void Post([FromBody]Models.CheckinJson checkin) { Mappers.MapSpot2Json mapper = new Mappers.MapSpot2Json(); var service = new CheckinService(_checkinrepository, _spotSearchRepository); service.CreateNewCheckIn(new Checkin() { CheckinTime = checkin.CheckinTime, Description = checkin.Description, Location = mapper.MapJson2Location(checkin.Location), } ); }
// POST: api/Spot public async Task Post([FromBody]Models.SpotJson spot) { Mappers.MapSpot2Json mapper = new Mappers.MapSpot2Json(); SpotService service = new SpotService(_spotrepository, _spotsearchrepository); await service.CreateNewSpot( spot.Name, spot.Description, spot.Directions, mapper.MapJson2Location(spot.Location), mapper.MapJson2Conditions(spot.Conditions), mapper.MapJson2Levels(spot.Levels) ); }