{"id":236,"date":"2012-09-21T11:54:42","date_gmt":"2012-09-21T11:54:42","guid":{"rendered":"http:\/\/ntspl.co.in\/blog\/?p=236"},"modified":"2024-09-18T10:48:58","modified_gmt":"2024-09-18T10:48:58","slug":"how-to-use-insertallonsubmit-in-linq","status":"publish","type":"post","link":"https:\/\/www.ntspl.co.in\/blog\/how-to-use-insertallonsubmit-in-linq\/","title":{"rendered":"How to use InsertAllOnSubmit in linq?"},"content":{"rendered":"<pre class=\"code-structure\"><code>using (SomeDataContext db = new SomeDataContext()) {\r\n\r\n\tList&lt;DbItemTableName&gt; dbItemlist = new List&lt;DbItemTableName&gt;();\r\n\r\n\tDbItemTableName d ;\r\n\r\n\tforeach(Item i in Items) {\r\n\r\n\t\td= new DbItemTableName();\r\n\r\n\t\td.value = i.value;\r\n\r\n\t\tdbItemlist.Add(d);\r\n\r\n\t}\r\n\r\n\tdb.InsertAllOnSubmit(dbItems);\r\n\r\n\tdb.SubmitChanges();\r\n\r\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>using (SomeDataContext db = new SomeDataContext()) { List&lt;DbItemTableName&gt; dbItemlist = new List&lt;DbItemTableName&gt;(); DbItemTableName d ; foreach(Item i in Items) { d= new DbItemTableName(); d.value = i.value; dbItemlist.Add(d); } db.InsertAllOnSubmit(dbItems); db.SubmitChanges(); }<\/p>\n","protected":false},"author":35,"featured_media":1522,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3],"tags":[57,184,185,213],"class_list":["post-236","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-asp-dot-net","tag-aspnet-linq","tag-insertallonsubmit","tag-insertallonsubmit-in-linq","tag-linq"],"acf":{"custom_meta_title":"How to use InsertAllOnSubmit in LINQ? | NTSPL","meta_description":"Do you know how to use InsertAllOnSubmit in LINQ? Read the simple and step by step article to know about InsertAllOnSubmit and get the code.","meta_keyword":"using insertallonsubmit, using insertallonsubmit in linq","other_meta_tag":"<meta property=og:locale content=\"en-IN\" \/>\r\n<meta property=og:type content=\"website\" \/>\r\n<meta property=og:title content=\"How to use InsertAllOnSubmit in LINQ? | NTSPL\"\/>\r\n<meta property=og:description content=\"Do you know how to use InsertAllOnSubmit in LINQ? Read the simple and step by step article to know about InsertAllOnSubmit and get the code.\"\/>\r\n<meta property=og:url content=\"https:\/\/www.ntspl.co.in\/blog\/how-to-use-insertallonsubmit-in-linq\"\/>\r\n<meta property=\"og:image\" content=\"https:\/\/www.ntspl.co.in\/blog\/wp-content\/uploads\/2012\/09\/how-to-use-insertallonsubmit-in-linq.jpg\"\/>\r\n<meta property=og:site_name content=NTSPL \/>\r\n<meta name=\"twitter:site\" content=\"@NTSPL\">\r\n<meta name=twitter:card content=\"summary\" \/>\r\n<meta name=twitter:description content=\"Do you know how to use InsertAllOnSubmit in LINQ? Read the simple and step by step article to know about InsertAllOnSubmit and get the code.\"\/>\r\n<meta name=twitter:title content=\"How to use InsertAllOnSubmit in LINQ? | NTSPL\"\/>"},"_links":{"self":[{"href":"https:\/\/www.ntspl.co.in\/blog\/wp-json\/wp\/v2\/posts\/236"}],"collection":[{"href":"https:\/\/www.ntspl.co.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ntspl.co.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ntspl.co.in\/blog\/wp-json\/wp\/v2\/users\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ntspl.co.in\/blog\/wp-json\/wp\/v2\/comments?post=236"}],"version-history":[{"count":5,"href":"https:\/\/www.ntspl.co.in\/blog\/wp-json\/wp\/v2\/posts\/236\/revisions"}],"predecessor-version":[{"id":10579,"href":"https:\/\/www.ntspl.co.in\/blog\/wp-json\/wp\/v2\/posts\/236\/revisions\/10579"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ntspl.co.in\/blog\/wp-json\/wp\/v2\/media\/1522"}],"wp:attachment":[{"href":"https:\/\/www.ntspl.co.in\/blog\/wp-json\/wp\/v2\/media?parent=236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ntspl.co.in\/blog\/wp-json\/wp\/v2\/categories?post=236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ntspl.co.in\/blog\/wp-json\/wp\/v2\/tags?post=236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}