Fully tested extension methods for querying Stored Procedures with NPoco
C#
Switch branches/tags
Nothing to show
Latest commit cd6575a Aug 6, 2015 @Workshop2 Changed build badge

README.md

NPoco.StoredProcedures

Fully tested extension methods for querying Stored Procedures with NPoco.

Install-Package NPoco.StoredProcedures

Build status

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;
}