コード例 #1
0
        public DummyApplicationDbContext()
        {
            Actie1 = new Actie()
            {
                actie = "actie1"
            };
            Actie = new[] { Actie1 };
            BoxActies boxActie = new BoxActies {
                BoxNaam = "box1", Actie = Actie1.actie
            };

            BoxActies      = new[] { boxActie };
            BoxActiesNamen = new[] { boxActie.Actie };

            Groepsbewerking1 = new Groepsbewerking {
                Opgave = "voeg 10 toe", Getal = "10", Operator = "+"
            };
            Groepsbewerking = new[] { Groepsbewerking1 };

            Doelstelling doelstelling = new Doelstelling {
                Doelstelling1 = "sommen"
            };

            Doelstelling = new[] { doelstelling };

            Oefening1 = new Oefening {
                Naam = "Oef1", Antwoord = "12", Feedback = "opnieuw", Opgave = "x + 2 = 14", Padnaarpdf = "pad", Timeleft = 0, Vak = "Wiskunde", Doelstelling = doelstelling.ToString()
            };
            Oefening2 = new Oefening {
                Naam = "Oef2", Antwoord = "10", Feedback = "opnieuw", Opgave = "x + 2 = 12", Padnaarpdf = "pad", Timeleft = 1, Vak = "Wiskunde", Doelstelling = doelstelling.ToString()
            };
            Oefening oefening3 = new Oefening {
                Naam = "Oef3", Antwoord = "14", Feedback = "opnieuw", Opgave = "x -2 = 10", Padnaarpdf = "pad", Timeleft = 0, Vak = "Wiskunde", Doelstelling = doelstelling.ToString()
            };

            Oefening = new[] { Oefening1, Oefening2, oefening3 };
            BoxOef boxOef1 = new BoxOef {
                BoxNaam = "box1", OefeningNaam = "Oef1"
            };
            BoxOef boxOef2 = new BoxOef {
                BoxNaam = "box1", OefeningNaam = "Oef2"
            };

            BoxOef      = new[] { boxOef1, boxOef2 };
            BoxOefNamen = new[] { boxOef1.OefeningNaam, boxOef2.OefeningNaam };

            Groep1 = new Groep {
                Id = "13", Groepnummer = "2", Leerlingen = "vital, fred, Johan, Joris"
            };
            Groep2 = new Groep {
                Id = "15", Groepnummer = "3", Leerlingen = "Jos, Tim, Justin, Wout"
            };
            Groep3 = new Groep {
                Id = "14", Groepnummer = "4", Leerlingen = "Jos, Tim, Justin, Wout"
            };

            Groep = new[] { Groep1, Groep2 };


            GroepOef groepOef1 = new GroepOef {
                Groep = "13", Oefening = "Oef1"
            };
            GroepOef groepOef2 = new GroepOef {
                Groep = "13", Oefening = "Oef2"
            };

            GroepOef = new[] { groepOef1, groepOef2 };

            Mergeall1 = new Mergeall {
                Id = "46", Actiecode = 10, Sessienaam = "sessie1", GroepId = "13", GroepsbewerkingOpgave = Groepsbewerking1.ToString(), OefNaam = "Oef1"
            };
            Mergeall = new[] { Mergeall1 };

            OefGbw oefGbw1 = new OefGbw {
                OefeningNaam = "Oef1", GroepsBewerkingId = Groepsbewerking1.Getal
            };

            OefGbw = new[] { oefGbw1 };


            Box box = new Box {
                Naam = "box1", Omschrijving = "een box"
            };

            Box = new[] { box };

            Sessie1 = new Sessie {
                Naam = "sessie1", Afstandsonderwijs = false, Beschikbaarvanaf = "18 05 2018", Code = "123", Omschrijving = "een sessie", BoxNaam = "box1"
            };
            Sessie2 = new Sessie {
                Naam = "sessie2", Afstandsonderwijs = false, Beschikbaarvanaf = "12 06 2018", Code = "321", Omschrijving = "een sessie", BoxNaam = "box1"
            };
            Sessie3 = new Sessie {
                Naam = "sessie3", Afstandsonderwijs = true, Beschikbaarvanaf = "18 05 2018", Code = "032", Omschrijving = "een sessie", BoxNaam = "box1"
            };
            Sessie = new[] { Sessie1, Sessie2 };

            SessieGroep sessieGroep1 = new SessieGroep {
                SessieNaam = "sessie1", GroepId = "13"
            };
            SessieGroep sessieGroep2 = new SessieGroep {
                SessieNaam = "sessie2", GroepId = "15"
            };
            SessieGroep sessieGroep3 = new SessieGroep {
                SessieNaam = "sessie3", GroepId = "14"
            };

            SessieGroep = new[] { sessieGroep1, sessieGroep2 };

            Vooruitgang1 = new Vooruitgang {
                AantalFoutePogingen = 0, GroepID = "13", Id = "1", IsFrozen = 0, OefNummer = 0, Score = 0, Sessienaam = "sessie1"
            };
            Vooruitgang2 = new Vooruitgang {
                AantalFoutePogingen = 0, GroepID = "15", Id = "2", IsFrozen = 1, OefNummer = 0, Score = 0, Sessienaam = "sessie2"
            };
            Vooruitgang3 = new Vooruitgang {
                AantalFoutePogingen = 0, GroepID = "14", Id = "3", IsFrozen = 0, OefNummer = 1, Score = 1, Sessienaam = "sessie1"
            };
            Vooruitgang4 = new Vooruitgang {
                AantalFoutePogingen = 0, GroepID = "14", Id = "3", IsFrozen = 0, OefNummer = 2, Score = 2, Sessienaam = "sessie2"
            };

            Vooruitgang          = new[] { Vooruitgang1, Vooruitgang2, Vooruitgang3, Vooruitgang4 };
            Sessie1Vooruitgangen = new[] { Vooruitgang1, Vooruitgang3 };
        }
コード例 #2
0
        public DummyApplicationDbContextFilterData()
        {
            _bobActies = new Collection <BobActie>();
            _bobActies.Add(new BobActie {
                BobNaam = "bobActie", LijstActiesNaam = "zoek aarde"
            });
            _bobActies.Add(new BobActie {
                BobNaam = "bobActie", LijstActiesNaam = "zoek lucht"
            });

            //_bobOefeningen

            _bob = new Bob {
                Naam = "bob"
            };

            //Groepen
            _groep1 = new Groep
            {
                Contactleer    = true,
                Currentstate   = null,
                CurrentstateId = null,
                Fout           = 0,
                GroepPad       = null,
                Groepstate     = null,
                Id             = 1,
                Klas           = "2C1",
                Leerlingen     = "Axel",
                Naam           = "Groep1"
            };
            _groep1.Currentstate = new GroepStartState(_groep1);
            _groep2 = new Groep
            {
                Contactleer    = true,
                Currentstate   = null,
                CurrentstateId = null,
                Fout           = 0,
                GroepPad       = null,
                Groepstate     = null,
                Id             = 2,
                Klas           = "2C1",
                Leerlingen     = "Thibaut",
                Naam           = "Groep2"
            };
            _groep2.Currentstate = new GroepStartState(_groep2);
            _groep3 = new Groep
            {
                Contactleer    = true,
                Currentstate   = null,
                CurrentstateId = null,
                Fout           = 0,
                GroepPad       = null,
                Groepstate     = null,
                Id             = 3,
                Klas           = "2C1",
                Leerlingen     = "Michiel",
                Naam           = "Groep3"
            };
            _groep3.Currentstate = new GroepStartState(_groep3);
            _groep4 = new Groep
            {
                Contactleer    = true,
                Currentstate   = null,
                CurrentstateId = null,
                Fout           = 0,
                GroepPad       = null,
                Groepstate     = null,
                Id             = 4,
                Klas           = "2C1",
                Leerlingen     = "Michiel",
                Naam           = "Groep4"
            };
            _groep4.Currentstate = new Groepgeblokkeerdstate(_groep4);
            _sessiegroep1        = new SessieGroep {
                Groepen = _groep1
            };
            _sessiegroep2 = new SessieGroep {
                Groepen = _groep2
            };
            _sessiegroep3 = new SessieGroep {
                Groepen = _groep3
            };

            //Sessies
            _maandag = new Sessie
            {
                Naam        = "maandag",
                Code        = 9999,
                Contactleer = true,
                Startdatum  = new DateTime(2018, 05, 25),
                BobNaam     = "bob",
                SessieGroep = new List <SessieGroep> {
                    _sessiegroep1, _sessiegroep2, _sessiegroep3
                }
            };
            _dinsdag = new Sessie
            {
                Naam        = "dinsdag",
                Code        = 9999,
                Contactleer = true,
                Startdatum  = new DateTime(),
                BobNaam     = "bob",
                SessieGroep = new List <SessieGroep> {
                    _sessiegroep1, _sessiegroep2, _sessiegroep3
                }
            };
            _woensdag = new Sessie
            {
                Naam        = "woensdag",
                Code        = 9599,
                Contactleer = true,
                Startdatum  = new DateTime(2018, 05, 4),
                BobNaam     = "bob2",
                SessieGroep = new List <SessieGroep> {
                    _sessiegroep1, _sessiegroep2, _sessiegroep3
                }
            };


            // Sessie voor Activatie
            //Groepen
            _groep1Donderdag = new Groep
            {
                Contactleer    = true,
                Currentstate   = null,
                CurrentstateId = null,
                Fout           = 0,
                GroepPad       = null,
                Groepstate     = null,
                Id             = 1,
                Klas           = "2C1",
                Leerlingen     = "Axel",
                Naam           = "Groep1"
            };
            _groep1Donderdag.Currentstate = new Groepkanspelenstate(_groep1Donderdag);
            _groep2Donderdag = new Groep
            {
                Contactleer    = true,
                Currentstate   = null,
                CurrentstateId = null,
                Fout           = 0,
                GroepPad       = null,
                Groepstate     = null,
                Id             = 2,
                Klas           = "2C1",
                Leerlingen     = "Thibaut",
                Naam           = "Groep2"
            };
            _groep2Donderdag.Currentstate = new Groepfinishedstate(_groep2Donderdag);
            _groep3Donderdag = new Groep
            {
                Contactleer    = true,
                Currentstate   = null,
                CurrentstateId = null,
                Fout           = 0,
                GroepPad       = null,
                Groepstate     = null,
                Id             = 3,
                Klas           = "2C1",
                Leerlingen     = "Michiel",
                Naam           = "Groep3"
            };
            _groep3Donderdag.Currentstate = new Groepspeelstate(_groep3Donderdag);

            _sessiegroep1Donderdag = new SessieGroep {
                Groepen = _groep1Donderdag
            };
            _sessiegroep2Donderdag = new SessieGroep {
                Groepen = _groep2Donderdag
            };
            _sessiegroep3Donderdag = new SessieGroep {
                Groepen = _groep3Donderdag
            };

            _donderdag = new Sessie
            {
                Naam        = "donderdag",
                Code        = 9599,
                Contactleer = true,
                Startdatum  = new DateTime(2018, 05, 4),
                BobNaam     = "bob2",
                SessieGroep =
                    new List <SessieGroep> {
                    _sessiegroep1Donderdag, _sessiegroep2Donderdag, _sessiegroep3Donderdag
                }
            };
        }