Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

EF Core 5.0.X Model Customizations - database first

$
0
0

I am modernizing a 4.X aspnet app to Blazor  Server/Wasm.

In the original app I was using EF 6.4.X and a whole bunch of model customizations. Been looking for how I can stil use these but all I find is for code first approach.

namespace BtServer.Data
{
    public class BtServerContext : IdentityDbContext<IdentityUser>
    {
        public BtServerContext(DbContextOptions<BtServerContext> options)
            : base(options)
        {
        }

        protected override void OnModelCreating(ModelBuilder builder)
        {
            base.OnModelCreating(builder);
            // Customize the ASP.NET Identity model and override the defaults if needed.
            // For example, you can rename the ASP.NET Identity table names and more.
            // Add your customizations after calling base.OnModelCreating(builder);
        }
    }
}

How does this work in database first approach?


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>