I typically use the Fluent API to configure my Entity Framework (Core) model. I think it gives me the most control without polluting my domain model with EF Core specific attributes.
You can do this directly inside the OnModelCreating method inside your DbContext but this can get out-of-control quite fast if you have a lot of objects to be mapped.
A better alternative is to use the IEntityTypeConfiguration<> interface together with the ApplyConfiguration method: