public static void AddAuthor(Author_tmp a) { DSMyLibraryDataContext ml = new DSMyLibraryDataContext(); ml.Author_tmps.InsertOnSubmit(a); ml.SubmitChanges(); }
protected void Button2_Click(object sender, EventArgs e) { try { Author_tmp tmp_author = new Author_tmp(); tmp_author.Name = txtName.Text; DAL.AddAuthor(tmp_author); Response.Redirect("~/Authors"); } catch (Exception) { throw; } }
partial void UpdateAuthor_tmp(Author_tmp instance);
partial void DeleteAuthor_tmp(Author_tmp instance);
partial void InsertAuthor_tmp(Author_tmp instance);