ASP.NET MVC Custom ModelMetadataProvider and ModelValidatorProvider

In my ASP.NET MVC application, I have a metadata-based model defined in the database. I have a custom object that defines data metadata and uses a dataset for DTO. To display this, I plan to write my own ModelMetadataProvider and ModelValidatorProvider.

Is this the right approach?

Any pointers to custom ModelMetadataProvider and ModelValidatorProvider?

+4
source share
1 answer

Last day or so, I tried to figure out the same thing. It seems that creating a custom ModelMetadataProvider and ModelValidatorProvider is the way to go if you have a metadata / validation configuration stored in a database, in some kind of file or elsewhere.

I found this great starting point.

Have you hacked the decision? NTN

Mana.

+5
source

Source: https://habr.com/ru/post/1334326/


All Articles