private SeatBusinessModel SeatModelBllToSeatModelContract(BusinessLogic.BusinessModels.SeatModel from) { return(new SeatBusinessModel { Seat = EventSeatParser.ToEventSeatContract(from.Seat), Area = EventAreaParser.ToEventAreaContract(from.Area), Event = EventParser.ToEventContract(from.Event), Layout = LayoutParser.ToLayoutContract(from.Layout), Venue = VenueParser.ToVenueContract(from.Venue) }); }
public async Task <IEnumerable <Layout> > ToList() { try { var result = await _layoutService.GetList(); return(result.Select(x => LayoutParser.ToLayoutContract(x))); } catch (LayoutException exception) { var fault = new ServiceValidationFaultDetails { Message = "Getting of list of layouts error" }; throw new FaultException <ServiceValidationFaultDetails>(fault, exception.Message); } }