PM> enable-migrations
Enable-Migrations is obsolete. Use Add-Migration to start using Migrations.
PM> Add-Migration initialDatabase
The EF Core tools version '2.1.1-rtm-30846' is older than that of the runtime '2.1.4-rtm-31024'. Update the tools for the latest features and bug fixes.
Microsoft.EntityFrameworkCore.Infrastructure[10403]
Entity Framework Core 2.1.4-rtm-31024 initialized 'MyCmsDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: None
Your target project 'MyCms.Web' doesn't match your migrations assembly 'MyCms.DataLayer'. Either change your target project or change your migrations assembly.
Change your migrations assembly by using DbContextOptionsBuilder. E.g. options.UseSqlServer(connection, b => b.MigrationsAssembly("MyCms.Web")). By default, the migrations assembly is the assembly containing the DbContext.
Change your target project to the migrations project by using the Package Manager Console's Default project drop-down list, or by executing "dotnet ef" from the directory containing the migrations project.
سلام ef core را آپدیت کنید