Beispiel #1
0
        public void Init()
        {
            Context = new TicketManagementContext();
            Data    = new DataProvider(Context);
            manager = Data.EventManager;

            Data.Clear();

            var venue = new Venue()
            {
                Address     = "sadasd",
                Description = "asdsadas",
                Phone       = "000",
            };

            venue.Id = Data.VenueManager.Save(venue);

            layout = new Layout()
            {
                Description = "asdadas",
                VenueId     = venue.Id,
            };
            layout.Id = Data.LayoutManager.Save(layout, Data.VenueManager);

            var area = new Area()
            {
                CoordX      = 10,
                CoordY      = 20,
                Description = "asdasd",
                LayoutId    = layout.Id,
            };

            area.Id = Data.AreaManager.Save(area, Data.LayoutManager, Data.SeatManager);

            var seat = new Seat()
            {
                AreaId = area.Id,
                Number = 3,
                Row    = 3
            };

            seat.Id = Data.SeatManager.Save(seat, Data.AreaManager);

            var venueWS = new Venue()
            {
                Address     = "venueWS",
                Description = "venueWS",
                Phone       = "000",
            };

            venueWS.Id = Data.VenueManager.Save(venueWS);

            layoutWithoutSeats = new Layout()
            {
                Description = "layoutWS",
                VenueId     = venueWS.Id,
            };
            layoutWithoutSeats.Id = Data.LayoutManager.Save(layoutWithoutSeats, Data.VenueManager);

            var areaWS = new Area()
            {
                CoordX      = 12,
                CoordY      = 15,
                Description = "areaWS",
                LayoutId    = layoutWithoutSeats.Id,
            };

            areaWS.Id = Data.AreaManager.Save(areaWS, Data.LayoutManager, Data.SeatManager);
        }