Exemplo n.º 1
0
 public static user createUser(user userObj)
 {
     GeoStoreDBEntities db = new GeoStoreDBEntities();
     db.users.AddObject(userObj);
     db.SaveChanges();
     return (getUserByName(userObj.name));
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the users EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTousers(user user)
 {
     base.AddObject("users", user);
 }
 /// <summary>
 /// Create a new user object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 public static user Createuser(global::System.Int64 id)
 {
     user user = new user();
     user.id = id;
     return user;
 }
 private user saveUserIndb(user userObj)
 {
     return user.createUser(userObj);
 }
 //retrieve user data from session.
 private user retrieveUserFromSession()
 {
     user userObj = new user();
     userObj.name = Session["UserName"].ToString();
     userObj.email = Session["Email"].ToString();
     userObj.open_id = Session["open_identifier"].ToString();
     return userObj;
 }