0

I'm following this tutorial https://docs.abp.io/en/abp/latest/Tutorials/Part-1?UI=NG&DB=EF#map-the-book-entity-to-a-database-table

In that step it instructs me to add b.ConfigureByConvention to the configuration in DbContext but dotnet tells me it is not defined.

I have abp version 5.3.4 and checked that the tutorial is for the correct version. I generated the project with the abp CLI so the packages should not be a problem.

Is there some step that I overlooked?

The complete error is:

'EntityTypeBuilder' does not contain a definition for 'ConfigureByConvention' and no accessible extension method 'ConfigureByConvention' accepting a first argument of type 'EntityTypeBuilder' could be found (are you missing a using directive or an assembly reference?)

1 Answer 1

2

The ConfigureByConvention method is an extension method, so your IDE probably could not find the related namespace and not suggested to you.

If you add using Volo.Abp.EntityFrameworkCore.Modeling; as namespace then it should work as expected.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.