我已经写了一个抽象类PaymentMethod
和2个派生类PaymentMethodInvoice
和PaymentMethodBilling
。对于他们每个人,我都写了共享的EditorTemplates
。
GET运行正常,我选择了PaymentMethod
并获得了正确的表格。如果我发布此表单,则模型绑定不起作用,它将尝试实例化抽象类PaymentMethod
。
我必须重写CreateModel protected override object CreateModel
还是有更好的解决方案来处理此问题?
我已经编写了一个抽象类PaymentMethod和2个派生类,PaymentMethodInvoice和PaymentMethodBilling。我为每个人编写了共享的EditorTemplates。 GET工作正常,我选择...
我必须重写CreateModel