mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2026-02-06 07:04:16 +01:00
Initial commit
This commit is contained in:
parent
0327744c5d
commit
b0b2401418
|
|
@ -28,7 +28,8 @@ public class Northwind : DbContext
|
|||
protected override void OnModelCreating(
|
||||
ModelBuilder modelBuilder)
|
||||
{
|
||||
if (Database.ProviderName.Contains("Sqlite"))
|
||||
if ((Database.ProviderName is not null)
|
||||
&& (Database.ProviderName.Contains("Sqlite")))
|
||||
{
|
||||
modelBuilder.Entity<Product>()
|
||||
.Property(product => product.UnitPrice)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@ public class Northwind : DbContext
|
|||
protected override void OnModelCreating(
|
||||
ModelBuilder modelBuilder)
|
||||
{
|
||||
if (Database.ProviderName.Contains("Sqlite"))
|
||||
if ((Database.ProviderName is not null)
|
||||
&& (Database.ProviderName.Contains("Sqlite")))
|
||||
{
|
||||
modelBuilder.Entity<Product>()
|
||||
.Property(product => product.UnitPrice)
|
||||
|
|
|
|||
Loading…
Reference in a new issue