public IHttpActionResult GetTourDetails(int id, [FromUri] ComfortType comfort, [FromUri] DateTime DateStart, [FromUri] DateTime DateFinish) { var tourDetail = IoC.Get <IGetTourDetails>().Get(new TourDetailsHelper { TourId = id, ComfortType = comfort, DateStart = DateStart, DateFinish = DateFinish }); return(Ok(tourDetail)); }
public Sedan(string registrationNumber, string model, int cost, double fuelEconomy, double maxSpeed, int countOfPlaces, ComfortType comfortType) : base(registrationNumber, model, cost, fuelEconomy, maxSpeed, countOfPlaces) { ComfortType = comfortType; }
private static TourDetailsDto MapHelper(ExtraAirCore.Models.EFModels.TourDetails tourDetails, ComfortType comfort) { return(new TourDetailsDto { CurrentPassengerCount = new CountPassengerDto { CountOfEconomyPassenger = tourDetails.CurrentCountOfEconomyPassenger, CountOfBusinessPassenger = tourDetails.CurrentCountOfBusinessPassenger }, BookedPoints = tourDetails.BookedPlaces.Where(b => b.ComfortType == comfort).Select(b => new BookedPoint { X = b.PointX, Y = b.PointY }).ToList() }); }