-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting started example does not work #3078
Comments
The issue here is presumably that the To fix the sample, we should probably just use EnsureDeleted/EnsureCreated - this would also simplify the very first getting started experience (no need for Design, tools, migrations...). If we really want to do migrations in this sample, we could put an absolute path which the user would then need to change. |
Create the database with EnsureCreated instead of with Migrations. Fixes #3078
It is very much by-design that we don't do this, since it promotes a bad pattern. If the getting started using migrations doesn't work out of the box, then we really need to fix the experience rather than changing the getting started. |
I would have thought that for initial application prototyping EnsureCreated is fine (after all it does exist), with full-on Migrations coming into play when the application first goes to production (at least that's what I did for my real-world EF app dev). I guess the question is whether we want a completely new user who knows nothing about EF to have to bother with migrations in their very first experience. Anyway, we can put in an absolute path and instruct the user to modify it - or whatever else you think we should do. |
@ajcvickers and others, I looked again and As we seem to have been OK with the VS workaround up to now, I guess this can simply be closed. On the other hand, it does seem like a pretty big wart on the very first getting started, so we can still just change the Sqlite database path to something like |
Changing In the ASP.NET Core repo, we get lots of question on where the DB is located. |
@Rick-Anderson thinking back to SQL CE - exact same challenge! |
Modified #3079 to specify |
Note that this solves the problem for Windows users, but on Linux and Mac |
I get a 'table blog does not exist' error and I verified the table was created correctly in the blogging.db. I've been trying to use sqlite with entity framework and I simply cannot get it to work. Not a fan of EF.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: