'Dapper Contrib Output Parameter

I'm research about Dapper Contrib Storeprocedure and I donn't know how to get value Output Parameter from the procedure, this is my store procedure:

ALTER PROC [dbo].[spCustomPaging]
    @SkipCount INT,
    @PageSize INT, /*record in 1 page*/
    @TotalRows INT OUTPUT /*tong record*/
AS
BEGIN
SET NOCOUNT ON;
    
    SELECT @TotalRows = COUNT(*)
    FROM dbo.Product

    SELECT *
    FROM dbo.Product
    ORDER BY ProductID OFFSET @SkipCount ROW FETCH NEXT @PageSize ROWS ONLY 

And This is my Dapper Contrib query:

db.Query<Models.Product>("spCustomPaging", new { SkipCount = skip, PageSize = pageSize }, commandType: System.Data.CommandType.StoredProcedure);

How I can get the TotalRow from the store with Dapper Contrib? Sorry for my bad English and Thank You.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source