public ContentResult Post([FromBody] object reservationDTO) { object reservation = ReservationMapping.MapDTOToDomainObject(reservationDTO); _logger.LogInformation("Reservation created ," + DateTime.UtcNow); object returnedReservation = enrichmentService.Add(reservation); if (returnedReservation != null) { return new ContentResult() { Content = JsonConvert.SerializeObject(ReservationMapping.MapDomainToDTOObject(returnedReservation)), ContentType = "application/json", StatusCode = 200 } } ; else { return new ContentResult() { StatusCode = 412 } }; }
public object Get(string id) { return(ReservationMapping.MapDomainToDTOObject(enrichmentService.Get(id))); }