コード例 #1
0
     	private void SomeControl_Click(object sender, EventArgs e)
        {
            db.SaveChanges();
	        db.Dispose();
            entity = new My_Entities();
            //more code using entity ...
	}
コード例 #2
0
     	private void SomeControl_Click(object sender, EventArgs e)
        {
            db.SaveChanges();
	    db.Dispose();
            db = new My_Entities();