NPoco.StoredProcedures
Fully tested extension methods for querying Stored Procedures with NPoco.
Install-Package NPoco.StoredProcedures
Example Usage
public IEnumerable<MonthTotal> TotalForMonthInterval(ValueQueryResult queryResult, int startMonthId, int endMonthId)
{
IDatabase database = _databaseFactory.GetDatabase();
var valueIdsParams = new Parameter("ValueIds", queryResult.GenerateCsv());
var startMonthParam = new Parameter("StartMonthId", startMonthId);
var endMonthParam = new Parameter("EndMonthId", endMonthId);
IEnumerable<MonthTotal> result = database.QueryStoredProcedure<MonthTotal>("[Aggregation].[Total_Months]", valueIdsParams, startMonthParam, endMonthParam);
return result;
}