Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EF 4.1 Code First error - The entity type SomeType is not part of the model for the current context

While working with EF code first I get error given below at different times:

The entity type SomeType is not part of the model for the current context.

What are the possible causes of this error?

like image 481
rovsen Avatar asked Apr 12 '11 11:04

rovsen


1 Answers

It may occur because:

  • DbContext configured with an incorrect connection string
  • The entity specified is actually not mapped in configuration
like image 64
rovsen Avatar answered Oct 01 '22 03:10

rovsen