I'm porting my EF to EF Core. There doesn't appear to be a HasDefaultSchema method in the new API. What is the equivalent of this code EF Core?
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.HasDefaultSchema("Notifications");
}
It's exactly the same as the sample code.
The only difference with EF6 is that as most of the EF Core fluent (and not only) method it's implemented as extension method (rather than instance method) of the ModelBuilder
class inside the RelationalModelBuilderExtensions
class.
In order to use it, make sure you reference the Microsoft.EntityFrameworkCore.Relational nuget, and have using Microsoft.EntityFrameworkCore;