I recently started using Rob Conery's Massive for reading from an Oracle database in C#.

It's working really well. However, recently I came across a problem when trying to perform an inner join. Usually you just do this to specify what table you are reading from:

public class Products:DynamicModel {

    public Products():base("northwind", "products","productid") {}
}

However, when performing an inner join you are reading from more than one table. How would I get around this?

有帮助吗?

解决方案

Just use Products.Query in that given join query. It will give all the property needed. Just go through blog post http://rob.conery.io/2011/09/27/massives-dynamic-query-syntax. This will help you out. It's from Rob Conery himself, who created Massive.

其他提示

It looks like you don't actually need the specify the table name.

If you just leave it as an empty string like below, the join works perfectly fine.

public class Products:DynamicModel {

    public Products():base("northwind", "", "productid") {}}
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top