Entity Framework - no results
Greetings.
I'm new(ish) to Linqpad but I'm already wondering how people ever dealt with data before its inception.
I have an Entity Frame work 6.1.3 model I'm trying to run queries on in Linqpad 4.55.03. The connection loads the schema just fine but
Am I doin it wrong?
Here's a picture.
I'm new(ish) to Linqpad but I'm already wondering how people ever dealt with data before its inception.
I have an Entity Frame work 6.1.3 model I'm trying to run queries on in Linqpad 4.55.03. The connection loads the schema just fine but
Blocks.Take (100)
returns no results, there are 82 rows in the SQL Express database. I got Blocks.Take (100)
from the right-click menu on the Blocks table in the DbContext listing.Am I doin it wrong?
Here's a picture.
Comments
You can test this by dumping 'this.Database' or similar.
@klundberg yes, a DLL. It's an Entity Framework connection, in the Add Connection dialogue it's in the bottom section - Entity Framework (DbContext)
@Joe - yup, it's the only database and the tables match. I think my issue is that I keep changing the database without using code-first migrations, today's error message is
The model backing the 'UserQuery' context has changed since the database was created. Consider using Code First Migrations to update the database ...
.I'm using
Database.SetInitializer(new DropCreateDatabaseIfModelChanges<AcadDbContext>());
in the DbContext constructor.