diff --git a/src/NzbDrone.Core/Datastore/Extensions/BuilderExtensions.cs b/src/NzbDrone.Core/Datastore/Extensions/BuilderExtensions.cs index fe650a61c..a25268b70 100644 --- a/src/NzbDrone.Core/Datastore/Extensions/BuilderExtensions.cs +++ b/src/NzbDrone.Core/Datastore/Extensions/BuilderExtensions.cs @@ -57,25 +57,22 @@ namespace NzbDrone.Core.Datastore public static SqlBuilder Join(this SqlBuilder builder, Expression> filter) { var wb = GetWhereBuilder(builder.DatabaseType, filter, false, builder.Sequence); - var rightTable = TableMapping.Mapper.TableNameMapping(typeof(TRight)); - return builder.Join($"\"{rightTable}\" ON {wb.ToString()}"); + return builder.Join($"\"{rightTable}\" ON {wb}"); } public static SqlBuilder LeftJoin(this SqlBuilder builder, Expression> filter) { var wb = GetWhereBuilder(builder.DatabaseType, filter, false, builder.Sequence); - var rightTable = TableMapping.Mapper.TableNameMapping(typeof(TRight)); - return builder.LeftJoin($"\"{rightTable}\" ON {wb.ToString()}"); + return builder.LeftJoin($"\"{rightTable}\" ON {wb}"); } public static SqlBuilder InnerJoin(this SqlBuilder builder, Expression> filter) { var wb = GetWhereBuilder(builder.DatabaseType, filter, false, builder.Sequence); - var rightTable = TableMapping.Mapper.TableNameMapping(typeof(TRight)); return builder.InnerJoin($"\"{rightTable}\" ON {wb}");