elsethrownewInvalidOperationException("No parsable object was sent in - could not divine any name/value pairs");
else
{
thrownewInvalidOperationException("No parsable object was sent in - could not divine any name/value pairs");
}
returnresult;
}
/// <summary>
...
...
@@ -420,7 +430,7 @@ public virtual dynamic Paged(string where = "", string orderBy = "", string colu
}
varsql=string.Format("SELECT {0} FROM (SELECT ROW_NUMBER() OVER (ORDER BY {2}) AS Row, {0} FROM {3} {4}) AS Paged ",columns,pageSize,orderBy,TableName,where);
varpageStart=(currentPage-1)*pageSize;
sql+=string.Format(" WHERE Row >={0} AND Row <={1}",pageStart,(pageStart+pageSize));
sql+=string.Format(" WHERE Row >={0} AND Row <={1}",pageStart,pageStart+pageSize);
@@ -15,8 +15,7 @@ public void ParentChildIdentityAssociations()
varparents=connection.Query<Parent,Child,Parent>(@"select 1 as [Id], 1 as [Id] union all select 1,2 union all select 2,3 union all select 1,4 union all select 3,5",
vardata=cnn.Query<PostCE,AuthorCE,PostCE>(@"select * from Posts p left join Authors a on a.ID = p.AuthorID",(post,author)=>{post.Author=author;returnpost;}).ToList();