-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding nullable entity sets if nullable is enabled for existing db co…
…ntexts. (#1891)
- Loading branch information
1 parent
28fb3a8
commit e8f9fb4
Showing
7 changed files
with
53 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
test/Scaffolding/VS.Web.CG.EFCore.Test/compiler/resources/DbContextNullable_After.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using Microsoft.EntityFrameworkCore; | ||
using ModelNamespace; | ||
namespace ContextNamespace | ||
{ | ||
public class MyContext : DbContext | ||
{ | ||
public MyContext() : base() | ||
{ | ||
} | ||
public DbSet<ModelNamespace.MyModel>? MyModel { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,4 @@ namespace ContextNamespace | |
} | ||
public DbSet<ModelNamespace.MyModel> MyModel { get; set; } | ||
} | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
test/Scaffolding/VS.Web.CG.EFCore.Test/compiler/resources/DbContext_Before.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
namespace ContextNamespace | ||
namespace ContextNamespace | ||
{ | ||
public class MyContext : DbContext | ||
{ | ||
public MyContext() : base() | ||
{ | ||
} | ||
} | ||
} | ||
} |