Exemplo n.º 1
0
 public void EFGet()
 {
     using (var db = new RepoEF())
     {
         var position = db.get("83.86.171.177");
         Debug.WriteLine(position.Lat+" "+position.Long);
     }
 }
Exemplo n.º 2
0
 public void EFGetAsync()
 {
     using (var db = new RepoEF())
     {
         var position = db.get("83.86.171.177");
         Debug.WriteLine("Position: " + position);
     }
 }
Exemplo n.º 3
0
        public void TestEF()
        {
            using (var db = new RepoEF())
            {
                var geoIp = new GeoIp() { Ip = "66.249.76.78", Lat = 37, Long = -122 };
                db.GeoIps.Add(geoIp);
                db.SaveChanges();

                // Display all Blogs from the database
                var query = from b in db.GeoIps
                            orderby b.Ip
                            select b;

                Debug.WriteLine("All geoips in the database:");
                foreach (var item in query)
                {
                    Debug.WriteLine(item.Ip);
                }
            }
            Debug.WriteLine("Done...");
        }