public virtual IEnumerable <T> Join <T1, T2, T3, T4, T5>(IDapperRepository <T1> join1, IDapperRepository <T2> join2, IDapperRepository <T3> join3, IDapperRepository <T4> join4, IDapperRepository <T5> join5, Func <T, T1, T2, T3, T4, T5, T> map, string joinOn, string where = null, string joinHint = null) { var joinSelectFields = new List <string>() { SelectFields, join1.SelectFields, join2.SelectFields, join3.SelectFields, join4.SelectFields, join5.SelectFields }; var joinTableNames = new List <string>() { join1.TableName, join2.TableName, join3.TableName, join4.TableName, join5.TableName }; var sql = GetJoinQuery(joinOn, where, joinSelectFields, joinTableNames, joinHint); var joinFields = GetJoinOnRightFields(joinOn).ToArray(); var i = 0; var splitOn = new List <string> { join1.GetEntityFieldName(joinFields[i++]), join2.GetEntityFieldName(joinFields[i++]), join3.GetEntityFieldName(joinFields[i++]), join4.GetEntityFieldName(joinFields[i++]), join5.GetEntityFieldName(joinFields[i++]) }; return(UsingDb(db => db.Query(sql, map, splitOn: Concat(splitOn)))); }