示例#1
0
        public static Usermap Get(int id)
        {
            GPSTrackerDataContext db = DataContextFactory.GetGPSTrackerDataContext();

            return((from um in db.Usermaps
                    where um.ID == id
                    select um).Single());
        }
示例#2
0
        public static void InsertUser(string username)
        {
            GPSTrackerDataContext db = DataContextFactory.GetGPSTrackerDataContext();
            Usermap um = new Usermap();

            um.Name = username;
            db.Usermaps.InsertOnSubmit(um);
            db.SubmitChanges();
        }