阅读背景:

我应该如何处理.NET对象中的复合键

来源:互联网 

I'm working on an MVC.NET application that uses several database tables that have composite keys. What's the best way to map these composite keys in my ORMs? My first thought was to use dictionary fields i.e. classKey AS dictionary(of string, string). This seems to work ok, but complicates the parameters of my controller methods...especially when going from the client to the controller. Then I thought use a string as the "Id" property in my objects models and create hashes out of the composite keys at the controller level to populate the Ids...not sure if I like this either. Your thoughts? I'm working on an MVC.NET application that uses




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: