Last post Jun 03, 2013 10:31 AM by paulbentley
Jun 03, 2013 08:45 AM|damon2012|LINK
I am using linqtosql. If you use insertonsubmit and pass in an object. Does the objects properties have to match the names of the columns in the database for this to work?
Jun 03, 2013 10:31 AM|paulbentley|LINK
The InsertOnSubmit(TEntity entity) method is generic based on the TEntity type of the base Table class. So you will only be able to pass in the correct type of entity for that table.
I.e. If you have mapped an SQL table "MyTable" in your LinqToSql dbml, You will have a Table<MyTable> called MyTables in your model. The InsertOnSubmit method on MyTables will only accept a "MyTable" object.