ASP.net MVC v2 - Debugging Model Binding Issues - BUG?

前端 未结 2 2083
灰色年华
灰色年华 2020-12-29 05:55

I am having more than a little difficulty trying to debug why MVC is not binding correctly in a given case I have...

Basically, I have my action which receives a com

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-29 06:16

    Turns out this behavior is by design due to how interface inheritance works. Interfaces do not define implementations, thus ILocation doesn't "inherit" the properties of ILocationSource. Rather, ILocation only defines what a concrete implementation must implement.

    For the full details including the section of the CLI (Common Language Infrastructure) spec which defines this behavior, check out: http://haacked.com/archive/2009/11/10/interface-inheritance-esoterica.aspx

提交回复
热议问题