DotBased/DotBased.AspNet.Authority.EFCore/README.md
2025-02-02 23:33:00 +01:00

24 lines
417 B
Markdown

# EF Core database
## Add migration project
```csharp
options.UseSqlite("Data Source=dev-dotbased.db", c => c.MigrationsAssembly("PROJECT-NAME"));
```
## EF Tool
Add migration
```shell
dotnet ef migrations add MIGRATION-NAME --project PROJECT-NAME
```
Remove migrations
```shell
dotnet ef migrations remove --project PROJECT-NAME
```
Update database
```shell
dotnet ef database update --project PROJECT-NAME
```