문제

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