Skip to content
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

OS independent connection string path #3286

Closed
wants to merge 1 commit into from

Conversation

Rick-Anderson
Copy link
Contributor

Fixes #3285

@@ -11,7 +11,7 @@ public class BloggingContext : DbContext
// The following configures EF to create a Sqlite database file as `C:\blogging.db`.
// For Mac or Linux, change this to `/tmp/blogging.db` or any other absolute path.
protected override void OnConfiguring(DbContextOptionsBuilder options)
=> options.UseSqlite(@"Data Source=C:\blogging.db");
=> options.UseSqlite(@"Data Source=blogging.db");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will cause much confusion about where the file is located when debugging

@@ -11,7 +11,7 @@ public class BloggingContext : DbContext
// The following configures EF to create a Sqlite database file as `C:\blogging.db`.
// For Mac or Linux, change this to `/tmp/blogging.db` or any other absolute path.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already notes about this here...

@roji
Copy link
Member

roji commented Jun 8, 2021

See #3078 and #3079. If we do this, the issue described in #3078 (comment) will occur.

@smitpatel smitpatel deleted the Rick-Anderson-patch-1 branch August 12, 2021 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error in EF Tutorial
3 participants