Hi Everyone
I am working on the second try it now section in chapter 14 where I encounter an error at step 16 - (Save all your changes, close all open files, and then request NewPhotoAlbum.aspx). When I insert a name and click 'Insert' I get a ASP.NET yellow page of death that states "Object reference not set to an instance of an object"
When I place a break point (*) at:
Code:
protected void EntityDataSource1_Inserted(object sender, EntityDataSourceChangedEventArgs e)
{
(*) PhotoAlbum myPhotoAlbum = (PhotoAlbum)e.Entity;
At this point e is null and when I drill down to find more information I find the following exception:
InnerException = {"Cannot insert explicit value for identity column in table 'PhotoAlbum' when IDENTITY_INSERT is set to OFF."}
How can I set this property from VS 2010? Has anyone else received this error?
I would greatly appreciate anyone's help.
Thanks,