The model is not registered. However, in the NOP framework, all models of the entire system have been registered during initialization.
All of them have been bound here. So the above error is unclear. However, if it is not binding, check your own model. At first, we thought it was a dependency injection problem. Later we also saw it.
But when I process it in validators and validate the model. I found that I had another constructor. Haha, all the errors will disappear.
using NOP. admin. models. examination; using NOP. services. localization; using system; using system. collections. generic; using system. LINQ; using system. web; namespace NOP. admin. validators. examination {
Public
class coursevalidator: abstractvalidator
{
Public coursevalidator () {rulefor (x => X. coursename ). notempty (). withmessage (
"the course cannot be blank! "); rulefor (x => X. createonutc ). notempty (). withmessage (
"Creation Time Required" ) ;}}
Do not add any parameters in coursevalidator.