示例#1
0
        protected void newapplications_Click(object sender, EventArgs e)
        {
            DataClasses1DataContext db = new DataClasses1DataContext();
            var user = db.user_datas.FirstOrDefault(a => a.id == Int32.Parse(Session["User"].ToString()));

            game g = new game();
            g.Api_path = "";
            g.Name = TxtNewGme.Text;
            db.games.InsertOnSubmit(g);

            g.UserID = user.id;
            db.SubmitChanges();
        }
 partial void Deletegame(game instance);
 partial void Updategame(game instance);
 partial void Insertgame(game instance);
		private void detach_games(game entity)
		{
			this.SendPropertyChanging();
			entity.user_data = null;
		}