mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2025-12-06 05:32:03 +01:00
Update improvements.md
This commit is contained in:
parent
85fd10e541
commit
ac31cc7878
|
|
@ -202,6 +202,12 @@ public static IServiceCollection AddNorthwindContext(
|
|||
path = Path.GetFullPath(path);
|
||||
WriteLine($"Database path: {path}");
|
||||
|
||||
if (!File.Exists(path))
|
||||
{
|
||||
throw new FileNotFoundException(
|
||||
message: $"{path} not found.", fileName: path);
|
||||
}
|
||||
|
||||
services.AddDbContext<NorthwindContext>(options =>
|
||||
{
|
||||
// Data Source is the modern equivalent of Filename.
|
||||
|
|
|
|||
Loading…
Reference in a new issue