Exemplo n.º 1
0
 public static List<Labels> ShowAll()
 {
     Database.SetInitializer<TableContext>(null);
     var db = new TableContext();
     var query = from s in db.Labels
                 select s;
     return query.ToList();
 }
Exemplo n.º 2
0
        public static void SaveLabel(double valx, double valy, string inform, string name, byte[] madress)
        {
            using (var db = new TableContext())
            {
                Database.SetInitializer<TableContext>(null);
                var lab = new Labels
                {
                    Name = name,
                    Latitude = valx,
                    Longitude = valy,
                    Information = inform,
                    Image = madress
                };

                db.Labels.Add(lab);

                db.SaveChanges();

            }
        }