in cakephp我可以设置链接在一起的模型。例如,我可以有相关的表的数据库如下,.net链接模型
表:人民(ID,姓名,owesMeMoneyFlag)
表:汽车(ID,people_id,品牌,颜色)。
那么我可以代码
$person = Peoples::findByName("theTod");
// this will only grab the cars that belond to "theTod"
// the join is done automatically
$cars = $person->Cars->find('All');
// this will only grab the blue cars that belong to "theTod"
// findByColor method is made automatically
$cars = $person->Cars->findByColor("blue");
我的问题是:有没有这样的事在.NET(我将使用ASP MVC3 C#)?如果还有智能感知的支持,那将会很整洁。
你应该真的标记答案...我更喜欢我的...但我们需要时间来帮助你,请给予你认为最有帮助的一点。 – CrazyDart