Leandro
Leandro

Reputation: 67

Return ForeignKeys in SubSonic.Query

I have a table that possesses ForeignKeys In this code below that am using only the columns of the table informed in the parameter is return

public DataSet Store_RefreshData(string Table){
        Query q = new Query(Table);
        return q.ExecuteDataSet();
}

Precise to come back a field "descricao" of the related table using a SubSonic.Query.

Upvotes: 1

Views: 87

Answers (1)

John Sheehan
John Sheehan

Reputation: 78104

You'll have to write a stored procedure, then call it like so:

var db = new NorthwindDB();
StoredProcedure sproc = db.ListProductsWithSuchAndSuch();
DataSet results = sproc.ExecuteDataSet();

Upvotes: 1

Related Questions