File tree Expand file tree Collapse file tree 2 files changed +18
-7
lines changed
examples/EntityFrameworkCore.Ydb.Samples/Database.Operations.Tutorial Expand file tree Collapse file tree 2 files changed +18
-7
lines changed Original file line number Diff line number Diff line change 22using Microsoft . EntityFrameworkCore ;
33using Microsoft . EntityFrameworkCore . Diagnostics ;
44using Microsoft . Extensions . Configuration ;
5- using Microsoft . Extensions . Logging ;
65
76namespace Section_3 . ProjectEF ;
87
@@ -31,7 +30,6 @@ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
3130 var connectionString = configuration . GetConnectionString ( "Local" ) ;
3231
3332 optionsBuilder . UseYdb ( connectionString )
34- . LogTo ( Console . WriteLine , new [ ] { DbLoggerCategory . Database . Command . Name } , LogLevel . Information )
3533 . ConfigureWarnings ( warnings => warnings . Ignore ( RelationalEventId . PendingModelChangesWarning ) )
3634 . EnableSensitiveDataLogging ( ) ;
3735 }
Original file line number Diff line number Diff line change @@ -6,11 +6,24 @@ Based on the [tutorial](https://www.csharptutorial.net/entity-framework-core-tut
66
77## Running
88
9- Run all operations sequentially with:
10-
11- ``` bash
12- dotnet run
13- ```
9+ 1 . Set up [ YDB local] ( https://ydb.tech/docs/en/reference/docker/start ) .
10+
11+ 2 . Install the EF Core CLI tool and dependencies (if needed):
12+ ``` bash
13+ dotnet tool install --global dotnet-ef
14+ dotnet add package Microsoft.EntityFrameworkCore.Design
15+ ```
16+
17+ 3. Create the database and apply migrations:
18+ ` ` ` bash
19+ dotnet ef migrations add InitialCreate
20+ dotnet ef database update
21+ ` ` `
22+
23+ 4. Run all operations sequentially with:
24+ ` ` ` bash
25+ dotnet run
26+ ` ` `
1427
1528# # Available Operations
1629
You can’t perform that action at this time.
0 commit comments