private void InitializeData()
        {
            List <Cooperator> cooperators = new List <Cooperator>()
            {
                new Cooperator {
                    Id = 1, Name = "Jarek", Emial = "*****@*****.**"
                },
                new Cooperator {
                    Id = 2, Name = "Krzysiek", Emial = "*****@*****.**"
                },
                new Cooperator {
                    Id = 3, Name = "Adam", Emial = "*****@*****.**"
                }
            };

            _db.AddRange(cooperators);
            _db.SaveChanges();
        }
Exemple #2
0
        private void InitializeData()
        {
            var cards = new
                        List <Card>()
            {
                new Card {
                    Id = 1, Text = "Things to buy", Colour = Color.DarkGoldenrod, Title = "Shopping", ToDos = new List <ToDo>()
                    {
                        new ToDo()
                        {
                            Id = 1, Text = "Milk"
                        },
                        new ToDo()
                        {
                            Id = 2, Text = "Apple"
                        }
                    },
                    Cooperators = null
                },
                new Card {
                    Id = 2, Text = "Remember on interview", Colour = Color.Cyan, Title = "Work", ToDos = new List <ToDo>()
                    {
                        new ToDo()
                        {
                            Id = 3, Text = "Slides", Checked = true
                        },
                        new ToDo()
                        {
                            Id = 4, Text = "Application", Checked = true
                        }
                    }
                }
            };

            _db.AddRange(cards);
            _db.SaveChanges();
        }