简体   繁体   English

自定义 SQL 查询和 SubSonic ActiveRecord?

[英]Custom SQL Queries and SubSonic ActiveRecord?

I'm needing to do some SQL queries manually because ActiveRecord doesn't support any kind of XPath query.我需要手动执行一些 SQL 查询,因为 ActiveRecord 不支持任何类型的 XPath 查询。

I'd love if I could somehow send in a query and it give me back a list of data objects.如果我能以某种方式发送查询并返回数据对象列表,我会很高兴。 What would be the easiest way to do this without manually loading each column into an object's property在不手动将每一列加载到对象的属性中的情况下,最简单的方法是什么

SubSonic has a "CodingHorror" class which enables me to do inline queries and it has a method ExecuteTypedList<T>() . SubSonic 有一个“CodingHorror” class 使我能够进行内联查询,它有一个方法ExecuteTypedList<T>() So I'm going to try loading things that way and see how it works所以我将尝试以这种方式加载东西,看看它是如何工作的

So you need to load xml into c# objects?所以你需要将 xml 加载到 c# 对象中吗?
Sounds like this maybe...听起来可能是这样...

How do I map XML to C# objects我如何 map XML 到 C# 对象

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM