Domanda

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?

È stato utile?

Soluzione

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.

Altri suggerimenti

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") {}}
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top