Skip to content

Commit 56aad97

Browse files
committed
Update comments in SQLiteContext to clarify relationship definitions and EF Core CLI usage
1 parent ac4edeb commit 56aad97

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Assets/Sample/2. DatabaseOperations/Scripts/Database/SQLiteContext.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
1212
base.OnModelCreating(modelBuilder);
1313
modelBuilder.Entity<LevelData>();
1414

15-
// To create connection between tables read more about Code First EFCore approach
16-
// Highly recommended to use command line to generate the code automatically.
15+
// To define relationships between tables, configure navigation properties and use Fluent API.
16+
// Refer to the official EF Core documentation: https://learn.microsoft.com/en-us/ef/core/modeling/relationships
17+
// To generate code automatically, use the EF Core CLI tools. For example:
18+
// dotnet ef migrations add <MigrationName>
19+
// dotnet ef database update
1720
}
1821
}

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,11 @@ public class SQLiteContext : DbContext
8080
base.OnModelCreating(builder);
8181
builder.Entity<LevelData>();
8282

83-
// To create connection between tables read more about Code First EFCore approach
84-
// Highly recommended to use command line to generate the code automatically.
83+
// To define relationships between tables, configure navigation properties and use Fluent API.
84+
// Refer to the official EF Core documentation: https://learn.microsoft.com/en-us/ef/core/modeling/relationships
85+
// To generate code automatically, use the EF Core CLI tools. For example:
86+
// dotnet ef migrations add <MigrationName>
87+
// dotnet ef database update
8588
}
8689
}
8790
```

0 commit comments

Comments
 (0)