예제 #1
0
        public static KeyValuePair<Trip, TripViewModel> AccessSourceManyNestedProperties()
        {
            var tripId = Guid.NewGuid();
            var categoryId = Guid.NewGuid();
            var catalogId = Guid.NewGuid();

            var tripCatalog = new TripCatalog
            {
                Id = catalogId,
                Name = "Adventure - changed",
            };

            var categoryTrip = new CategoryTrip
            {
                Id = categoryId,
                Name = "Asia - changed",
                Catalog = tripCatalog
            };

            var trip = new Trip
            {
                Id = tripId,
                Name = "Fascinating family - changed",
                Category = categoryTrip
            };

            var tripViewModel = new TripViewModel
            {
                Id = tripId
            };

            return new KeyValuePair<Trip, TripViewModel>(trip, tripViewModel);
        }
예제 #2
0
        public static KeyValuePair<Trip, TripViewModel> ExistingDestinationMediumMap()
        {
            var tripId = Guid.NewGuid();
            var categoryId = Guid.NewGuid();
            var catalogId = Guid.NewGuid();
            var typeId = Guid.NewGuid();

            var tripType = new TripType
            {
                Id = typeId,
                Name = "Easy - changed",
            };

            var tripTypeViewModel = new TripTypeViewModel
            {
                Id = typeId,
                Name = "Easy",
            };

            var tripCatalog = new TripCatalog
            {
                Id = catalogId,
                Name = "Adventure - changed",
                TripType = tripType
            };

            var tripCatalogViewModel = new TripCatalogViewModel
            {
                Id = catalogId,
                Name = "Adventure",
                TripType = tripTypeViewModel
            };

            var categoryTrip = new CategoryTrip
            {
                Id = categoryId,
                Name = "Asia - changed",
                Catalog = tripCatalog
            };

            var categoryTripViewModel = new CategoryTripViewModel
            {
                Id = categoryId,
                Name = "Asia",
                Catalog = tripCatalogViewModel
            };

            var trip = new Trip
            {
                Id = tripId,
                Name = "Fascinating family - changed",
                Category = categoryTrip
            };

            var tripViewModel = new TripViewModel
            {
                Id = tripId,
                Name = "Fascinating family",
                Category = categoryTripViewModel
            };

            return new KeyValuePair<Trip, TripViewModel>(trip, tripViewModel);
        }