I using EntityFramewrok and I want to bind a class with stored procedure.
My procedure select query :
Select RecordId,Name_TrTr Name from Institute where Name_TrTr like ('%'+@Search+'%')
Order by Name
OFFSET @Start ROWS
FETCH NEXT @Length ROWS ONLY
Select @TotalCount as TotalCount, @FilteredCount FilteredCount
My Classses :
public class InstituteTestModel
{
public int RecordId { get; set; }
public string Name { get; set; }
}
public class ProcedureDetail
{
public int TotalCount { get; set; }
public int FilteredCount { get; set; }
}
public class ProcedureClass
{
public InstituteTestModel Model { get; set; }
public ProcedureDetail Detail { get; set; }
}
C# execute:
var q = Connection.Database<ProcedureClass>(query);