亚音速深负荷:是否支持?

编程入门 行业动态 更新时间:2024-10-19 23:34:16
本文介绍了亚音速深负荷:是否支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

很可能我只是在这个领域中缺少正确的本地语言,但是我正在寻找SubSonic中的特定功能.在NetTiers中,它被称为"DeepLo​​ad".一个深层的负载运行到数据库,并在一个数据库调用中获取许多对象(即,获取此OrderDetail及其所有LineItems).

It could very well be that I'm just missing the correct vernacular in this space, but I'm looking for a particular piece of functionality in SubSonic. In NetTiers it was called a "DeepLoad". A deep load runs to the database and fetches many objects (ie. fetch this OrderDetail and all of it's LineItems) in one database call.

同样,我想在建立一个可能密集的对象图或数据存储所填充的相关项目之后运行到数据存储.

Again, I want to run to the data store once an build up a potentially dense object graph or related items populated by the data store.

我如何在SubSonic中做到这一点,在SubSonic中又叫什么?

推荐答案

您可以使用带有延迟加载的IQueryable在SubSonic 3.0(尚未发布,但几乎在那里...)中做到这一点:

You can do this in SubSonic 3.0 (not yet released, but almost there...) using IQueryable with lazy loading:

var db=new NorthwindDB(); var order=db.Orders.Where(x=>.xID==20).SingleOrDefault(); Assert.Equal(3,order.OrderDetails.Count());

如果您不在3(需要 3.5)上,则可以使用Paul提到的Active record来做到这一点-但这会打两个电话.

if you're not on 3 (which requires 3.5) you can do this with Active record as Paul mentions - but it will make two calls.

更多推荐

亚音速深负荷:是否支持?

本文发布于:2023-10-25 08:38:13,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1526458.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:亚音速   负荷

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!