Migrations

Migrating from the old ASP.NET Core Angular Spa template to the newer one

Client Side Changes: If you are using the ASP.NET Core Angular SPA template that has been shipped with the .NET Core 2.0 release of the framework, you will have the following project structure. Assuming that you put your application scripts under the ClientApp/app folder. So, before migrating, take a back up of the folder. Delete the ClientApp folder altogether. We will generate the folder with the Angular CLI. On the project root directory, open up a command prompt window and generate an Angular app by running the…

Keep reading

Enable Entity Framework Core (1.1.1) Migrations From Separate Assembly

Watch the video if you don't like reading: So, today I tried updating all my project packages to dotnet core 1.1.1. Everything went pretty well except the EF Core's 1.1.1 update. Like everyone else I like putting my DbContext and Repository files in a seperate assembly. A barebone DbContext class may look like this: public class ApplicationDbContext : DbContext { public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options) { } } Up until 1.1.0 I was able to run migrations. But today when I tried to add a…

Keep reading