コード例 #1
0
ファイル: MeetupSeeder.cs プロジェクト: Raevva13/MeetupAPI
        private void InsertSampleData()
        {
            var meetups = new List <Meetup>
            {
                new Meetup
                {
                    Name      = "Web summit",
                    Date      = DateTime.Now.AddDays(7),
                    IsPrivate = false,
                    Organizer = "Microsoft",
                    Location  = new Location
                    {
                        City     = "Krakow",
                        Street   = "Szeroka 33/5",
                        PostCode = "31-337"
                    },
                    Lectures = new List <Lecture>
                    {
                        new Lecture
                        {
                            Author      = "Bob Clark",
                            Topic       = "Modern browsers",
                            Description = "Deep dive into V8"
                        }
                    }
                },

                new Meetup
                {
                    Name      = "4Devs",
                    Date      = DateTime.Now.AddDays(7),
                    IsPrivate = false,
                    Organizer = "KGD",
                    Location  = new Location
                    {
                        City     = "Warszsawa",
                        Street   = "Chmielna 33/5",
                        PostCode = "00-007"
                    },
                    Lectures = new List <Lecture>
                    {
                        new Lecture
                        {
                            Author      = "Will Smith",
                            Topic       = "React.js",
                            Description = "Redux introduction"
                        },
                        new Lecture
                        {
                            Author      = "John Cena",
                            Topic       = "Angular store",
                            Description = "Ngxs in practise"
                        }
                    }
                },
            };

            _meetupContext.AddRange(meetups);
            _meetupContext.SaveChanges();
        }
コード例 #2
0
        private void InsertSimpleData()
        {
            var meetups = new List <Meetup>
            {
                new Meetup
                {
                    Name      = "Web Submit",
                    Date      = DateTime.Now.AddDays(7),
                    IsPrivate = false,
                    Organizer = "Microsoft",
                    Location  = new Location()
                    {
                        City     = "Nowa Sól",
                        Street   = "Matejki 22",
                        PostCode = "67-100"
                    },
                    Lectures = new List <Lecture>
                    {
                        new Lecture
                        {
                            Author      = "Bob Clark",
                            Topic       = "Modern Browsers",
                            Description = "Deep dive into V8"
                        }
                    }
                },

                new Meetup
                {
                    Name      = "4Devs",
                    Date      = DateTime.Now.AddDays(3),
                    IsPrivate = false,
                    Organizer = "Microsoft",
                    Location  = new Location()
                    {
                        City     = "Wroclaw",
                        Street   = "Matejki 22",
                        PostCode = "00-007"
                    },
                    Lectures = new List <Lecture>
                    {
                        new Lecture
                        {
                            Author      = "Bob Clark",
                            Topic       = "Modern Browsers",
                            Description = "Deep dive into V10 Porsche"
                        },
                        new Lecture
                        {
                            Author      = "Lukasz Zietek",
                            Topic       = "Swiat i Kredki",
                            Description = "Wejscie w swiat 5G"
                        }
                    }
                }
            };

            _meetupContext.AddRange(meetups);
            _meetupContext.SaveChanges();
        }
コード例 #3
0
        private void InsertSampleData()
        {
            var meetups = new List <Meetup>
            {
                new Meetup
                {
                    Name      = "Web summit",
                    Date      = DateTime.Now.AddDays(7),
                    IsPrivate = false,
                    Organizer = "Mircosoft",
                    Location  = new Location
                    {
                        City     = "HCM",
                        Street   = "Cach Mang Thang 8",
                        PostCode = "71234"
                    },
                    Lectures = new List <Lecture>
                    {
                        new Lecture
                        {
                            Author      = "Duy Hoang",
                            Topic       = "Modern browsers",
                            Description = "Deep live into V8"
                        }
                    }
                },
                new Meetup
                {
                    Name      = "4Devs",
                    Date      = DateTime.Now.AddDays(7),
                    IsPrivate = false,
                    Organizer = "KGD",
                    Location  = new Location
                    {
                        City     = "HCM",
                        Street   = "Thong nhat",
                        PostCode = "70007"
                    },
                    Lectures = new List <Lecture>
                    {
                        new Lecture
                        {
                            Author      = "Hoang Tran",
                            Topic       = "react.js",
                            Description = "new technical"
                        },
                        new Lecture
                        {
                            Author      = "Johnny",
                            Topic       = "angular.js",
                            Description = "new frontend technical"
                        }
                    }
                }
            };

            _meetupContext.AddRange(meetups);
            _meetupContext.SaveChanges();
        }
コード例 #4
0
        private void InsertsampleData()
        {
            var meetups = new List <Meetup>

            {
                new Meetup
                {
                    Name      = "Web Summit",
                    Date      = DateTime.Now.AddDays(7),
                    IsPrivate = false,
                    Organizer = "MS",
                    Location  = new Location
                    {
                        City     = "Belgrade",
                        Street   = "Bulevar Mira 22",
                        PostCode = "11070"
                    },

                    Lectures = new List <Lecture>
                    {
                        new Lecture
                        {
                            Author      = "Bob Klark",
                            Topic       = "Browsers",
                            Description = "Dive into V8"
                        }
                    }
                },

                new Meetup
                {
                    Name      = "4Devs",
                    Date      = DateTime.Now.AddDays(10),
                    IsPrivate = false,
                    Organizer = "KGD",
                    Location  = new Location
                    {
                        City     = "Belgrade",
                        Street   = "Bulevar Revolucije 212",
                        PostCode = "11000"
                    },

                    Lectures = new List <Lecture>
                    {
                        new Lecture
                        {
                            Author      = "Rob smith",
                            Topic       = ".NET",
                            Description = "Dive into .NET 5"
                        }
                    }
                }
            };


            _meetupContext.AddRange(meetups);
            _meetupContext.SaveChanges();
        }
コード例 #5
0
        private void InsertSampleData()
        {
            var meetups = new List <Meetup>
            {
                new Meetup
                {
                    Name      = "Web submit",
                    Date      = DateTime.Now.AddDays(7),
                    IsPrivate = false,
                    Organizer = "Microsoft",
                    Location  = new Location
                    {
                        City     = "Prague",
                        Street   = "Laubova 33",
                        PostCode = "00100"
                    },
                    Lectures = new List <Lecture>
                    {
                        new Lecture
                        {
                            Author      = "Bob Clark",
                            Topic       = "Modern Browsers",
                            Description = "Deep dove into V8"
                        }
                    }
                },
                new Meetup
                {
                    Name      = "4Devs",
                    Date      = DateTime.Now.AddDays(7),
                    IsPrivate = false,
                    Organizer = "KGD",
                    Location  = new Location
                    {
                        City     = "Warszaw",
                        Street   = "Chmielna 33/5",
                        PostCode = "00-007"
                    },
                    Lectures = new List <Lecture>
                    {
                        new Lecture
                        {
                            Author      = "Will Smith",
                            Topic       = "1000 words",
                            Description = "Budhism"
                        }
                    }
                },
            };



            _meetupContext.AddRange(meetups);
            _meetupContext.SaveChanges();
        }
コード例 #6
0
ファイル: MeetupSeeder.cs プロジェクト: CoderYihaoWang/MeetUp
        private void InsertSampleData()
        {
            var meetups = new List <Meetup>
            {
                new Meetup
                {
                    Name      = "First meet up",
                    Organizer = "Alice",
                    Date      = DateTime.Now.AddDays(7),
                    IsPrivate = false,
                    Location  = new Location
                    {
                        City     = "Auckland",
                        Street   = "Mount Street",
                        PostCode = "1010",
                    },
                    Lectures = new List <Lecture>
                    {
                        new Lecture
                        {
                            Author      = "Tom",
                            Topic       = "Art",
                            Description = "A lecture on art"
                        },
                        new Lecture
                        {
                            Author      = "Jerry",
                            Topic       = "Math",
                            Description = "A lecture on math"
                        }
                    }
                },
                new Meetup
                {
                    Name      = "Second meet up",
                    Organizer = "Bob",
                    Date      = DateTime.Now.AddDays(14),
                    IsPrivate = true,
                    Location  = new Location
                    {
                        City     = "Wellington",
                        Street   = "Sussex Street",
                        PostCode = "6100",
                    },
                    Lectures = new List <Lecture>
                    {
                        new Lecture
                        {
                            Author      = "Wang",
                            Topic       = "Art",
                            Description = "A lecture on art"
                        },
                        new Lecture
                        {
                            Author      = "Zhang",
                            Topic       = "Math",
                            Description = "A lecture on math"
                        }
                    }
                },
            };

            _meetupContext.AddRange(meetups);
            _meetupContext.SaveChanges();
        }
コード例 #7
0
ファイル: MeetupSeeder.cs プロジェクト: poruta-ent/r-api
        private void InsertSampleData()
        {
            var meetups = new List <Meetup>
            {
                new Meetup
                {
                    Name      = "M 1",
                    Date      = DateTime.Now.AddDays(15),
                    IsPrivate = false,
                    Organizer = "O1",
                    Location  = new Location
                    {
                        City       = "Prze",
                        Street     = "Long",
                        PostalCode = "00-111"
                    },
                    Lectures = new List <Lecture>
                    {
                        new Lecture
                        {
                            Author      = "A1.1",
                            Topic       = "T1.1",
                            Description = "Desc1.1"
                        },
                        new Lecture
                        {
                            Author      = "A1.2",
                            Topic       = "T1.2",
                            Description = "Desc1.2"
                        }
                    }
                },
                new Meetup
                {
                    Name      = "M2",
                    Date      = DateTime.Now.AddDays(35),
                    IsPrivate = true,
                    Organizer = "O2",
                    Location  = new Location
                    {
                        City       = "Strze",
                        Street     = "Short",
                        PostalCode = "11-000"
                    },
                    Lectures = new List <Lecture>
                    {
                        new Lecture
                        {
                            Author      = "A2.1",
                            Topic       = "T2.1",
                            Description = "Desc2.1"
                        },
                        new Lecture
                        {
                            Author      = "A2.2",
                            Topic       = "T2.2",
                            Description = "Desc2.2"
                        }
                    }
                }
            };

            _meetupContext.AddRange(meetups);
            _meetupContext.SaveChanges();
        }