You can call context.Database.Migrate()
in your Startup.cs
eg:
using (var context = new MyContext(...))
{
context.Database.Migrate();
}
More Related Contents:
- Equivalent for .HasOptional in Entity Framework Core 1 (EF7)
- Loop/reflect through all properties in all EF Models to set Column Type
- Using EF Core ThenInclude() on Junction tables
- Changes in IDENTITY column after EF core 3
- What goes into DbContextOptions when invoking a new DbContext?
- EF Core Second level ThenInclude missworks
- No executable found matching command “dotnet-ef”
- How to select top N rows for each group in a Entity Framework GroupBy with EF 3.1
- Entity framework core update many to many
- Dynamically changing schema in Entity Framework Core
- ef core 2 apply HasQueryFilter for all entity
- Unable to edit db entries using EFCore, EntityState.Modified: “Database operation expected to affect 1 row(s) but actually affected 0 row(s).”
- Implementing recursive property loading in EF Core
- Entity Framework Core 2.0 – Run migrations step by step
- EF Core 2: How to apply HasQueryFilter for all entities
- Dynamically access table in EF Core 2.0
- EF Query With Conditional Include
- Set decimal(16, 3) for a column in Code First Approach in EF4.3 [duplicate]
- How to make EF-Core use a Guid instead of String for its ID/Primary key
- Entity Framework and calling context.dispose()
- In-memory database doesn’t save data
- check constraint entity framework
- int to string in Entity Framework
- EF Code First foreign key without navigation property
- LINQ to Entities for subtracting 2 dates
- Entity Framework Code First Many to Many Setup For Existing Tables
- How to set Identity Seed value in code-first?
- Changing Inherited Types in Entity Framework
- Why is my Entity Framework Code First proxy collection null and why can’t I set it?
- Why does the entity framework need an ICollection for lazy loading?