M
M
mastersoftna2012-01-19 12:10:46
SQL
mastersoftna, 2012-01-19 12:10:46

LINQ TO SQL. Get the id of the added post

How can I get the id of the entry added to the table. I use LINQ TO SQL.

Adding an entry: Is it possible to do this without calling select on this entry?

DISC disc = new DISC();
disc.DISC_DATE = basecddate;
disc.CHART_TYPE = 3;
disc.DISC_NUMBER = week;
disc.DISC_TYPE = 1;
contex.DISC.InsertOnSubmit(disc);
contex.SubmitChanges();


Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PomanoB, 2012-01-19
@mastersoftna

As far as I remember just disc.id

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question