Apr 18, 2011 at 12:47 AM
Edited Apr 18, 2011 at 12:48 AM
I'm looking for an example of a simple query on 2 index fields. The documentation examples go from a basic key query to a complex join and I'm looking for something in the middle.
I have a class with a key field and 2 index fields. Here is the table definition:
CreateTableDefinition<GridDetailDto, int>( k => k.RowId )
.WithIndex<GridDetailDto, int, int>("MasterId", t => t.GridMasterId)
.WithIndex<GridDetailDto, int, int>("JobId", t => t.JobId)
To get a list of keys my SQL query would be:
select RowId from GridDetailDto where GridMasterId = 1 and JobId = 2
How would I do this using sterling?