public static Usermap Get(int id) { GPSTrackerDataContext db = DataContextFactory.GetGPSTrackerDataContext(); return((from um in db.Usermaps where um.ID == id select um).Single()); }
public static void InsertUser(string username) { GPSTrackerDataContext db = DataContextFactory.GetGPSTrackerDataContext(); Usermap um = new Usermap(); um.Name = username; db.Usermaps.InsertOnSubmit(um); db.SubmitChanges(); }