I have an older stored proc that returns a set of records as well as an output value. Is it possible to call a stored proc with an output parameter and return it back to the UI/Biz layer using HwyFwk?
Here is my query:
public class GetLog : AdvancedQuery<GetLogResult>
{
public GetLog(int currentPage,int pageSize)
{
ContextQuery = db =>
{
var sql = string.Format("execute GetLog");
SqlParameter outputIdParam = new SqlParameter("@ReturnValue", SqlDbType.Int)
{
Direction = ParameterDirection.Output
};
var results = db.Database.SqlQuery<GetActivityLogResult>(sql,
new SqlParameter("@CurrentPage",currentPage),
new SqlParameter("@PageSize",currentPage),
outputIdParam
).AsQueryable();
//How can I return this and my recordset back to the UI/Biz layer?
//TotalRows = (int)outputIdParam.Value;
return results;
};
}
}
I have an older stored proc that returns a set of records as well as an output value. Is it possible to call a stored proc with an output parameter and return it back to the UI/Biz layer using HwyFwk?
Here is my query: