Hello guys,
I'm having a problem with the Create method of the NerdDinner tutorial, which is very good BTW.
As you can see here http://nerddinnerbook.s3.amazonaws.com/Part5.htm in the Create method, he removed the ID field of the aspx page.
I did that too, but I cannot add any dinners because I get a primary key violation.
How is NerdDinner controlling the ids of each dinner? I revised the tutorial and could not see any references to identity fields on SQL database.
I even created a method to get me the highest id in the table:
public int GetHighestDinnerId()
{
int resultado = (from dinner in dataContext.Dinners
select dinner.DinnerId).Max();
return resultado;
}
which does not work either.
Any thoughts?
Thank you