How to implement EF database first approach in Asp.net Core Blazor ?


Step 1: Create the database as per as your requirement
Step 2: Install the EF Core Power Tool in Visual studio like this

https://marketplace.visualstudio.com/items?itemName=ErikEJ.EFCorePowerTools

Step 3: Go to the solution explorer and right click on it then EF Power Tool then Reverse Engineer as given below image

Solution Exp

Step 4:  Select the database name like this

database name

then click on OK

Step 5: Select all the required table which one we are going to use in application

Step 6:  Now Select the namespace and context name like given below

Namespace

Step 7 : Click on OK. Now this tool will generate the required model and context file in Data folder.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.