Esempio n. 1
0
        public static void Initialize(MyFriendsPositionContext context)
        {
            context.Database.EnsureCreated();
            var myFriendsPositionsList = new List <MyNearByFriends.Models.MyFriendPosition> {
                new MyFriendPosition("Eduardo Bariquello", -150, -110),
                new MyFriendPosition("MyFriend A", 10, 20),
                new MyFriendPosition("MyFriend B", -63, -71),
                new MyFriendPosition("MyFriend C", 20, 55),
                new MyFriendPosition("MyFriend D", 40, 45),
                new MyFriendPosition("MyFriend E", -21, -09),
                new MyFriendPosition("MyFriend F", 47, 53),
                new MyFriendPosition("MyFriend G", -30, -44),
                new MyFriendPosition("MyFriend H", 150, 122),
                new MyFriendPosition("MyFriend I", -100, -88),
            };

            foreach (MyFriendPosition mfp in myFriendsPositionsList)
            {
                context.MyFriendsPositions.Add(mfp);
            }
            context.SaveChanges();

            context.Users.Add(new User
            {
                UserLogin = "******",
                Password  = "******",
            });
            context.Users.Add(new User
            {
                UserLogin = "******",
                Password  = "******",
            });


            context.SaveChanges();
        }
Esempio n. 2
0
 public MyFriendPositionRepository(MyFriendsPositionContext context)
 {
     _context = context;
 }
Esempio n. 3
0
 public CalcHistoryLogRepository(MyFriendsPositionContext context)
 {
     _context = context;
 }