From 99f3fd89f977f4275926b7c5fa13e1ae467b6364 Mon Sep 17 00:00:00 2001 From: Koen Bekkenutte <2912652+kbekkenutte@users.noreply.github.com> Date: Mon, 31 May 2021 04:35:52 +0800 Subject: [PATCH] Fixed generator issue --- .../ProjectionExpressionGenerator.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/EntityFrameworkCore.Projections.Generator/ProjectionExpressionGenerator.cs b/src/EntityFrameworkCore.Projections.Generator/ProjectionExpressionGenerator.cs index ae3dcdd..214232b 100644 --- a/src/EntityFrameworkCore.Projections.Generator/ProjectionExpressionGenerator.cs +++ b/src/EntityFrameworkCore.Projections.Generator/ProjectionExpressionGenerator.cs @@ -4,6 +4,7 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Text; using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Text; using System.Threading; @@ -50,7 +51,7 @@ namespace EntityFrameworkCore.Projections.Generator if (projectable.ClassNamespace is not null && projectable.ClassNamespace != projectable.TargetClassNamespace) { - var classUsingDirective = $"using {projectable.TargetClassNamespace};"; + var classUsingDirective = $"using {projectable.ClassNamespace};"; if (!projectable.UsingDirectives.Contains(classUsingDirective)) {