Schema not being generated for a table in Entity Framework

Posted by SheoNarayan under Error and Solution on 10/31/2010 | Points: 10 | Views : 3949 | Status : [Administrator] | Replies : 0

Today I was facing a strange issue when I was trying to update the schema of my Entity Framework and a particular newly added table was not being updated into Entity Framework model.

I tried several ways and spend around an hour or so but couldn't solve the problem (I created new connection, changed the table name, field names bla bla bla).

Lastly I closely looked at my database table and I noticed that there was no primary key (I think without primary key at least the schema can be generated) but my Id field of that table was accepting null value (I didn't know how I missed while creating the table) and I thought this is the issue. I update the table with Id field as Not Null and marked as primary and it did the trick! I was successfully able to create the schema for that table too !

Thought it would help someone.

Sheo Narayan


(No response found.)

Login to post response