Skip to content

Commit 2a8b42b

Browse files
committed
use NamespaceName for com prefix
1 parent 2f182cb commit 2a8b42b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/GraphODataTemplateWriter/Extensions/OdcmModelExtensions.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,9 @@ public static string GetFullyQualifiedImportStatementForModel(this CustomT4Host
204204
if (shouldDisambiguate)
205205
{
206206
// Form the import statement to disambiguate the model in the generated code file.
207-
var thisNamespace = host.CurrentModel.GetNamespace();
208-
var thisTypeName = (host.CurrentType as OdcmProperty).Type.Name.ToUpperFirstChar();
207+
var thisType = (host.CurrentType as OdcmProperty).Type;
208+
var thisNamespace = thisType.Namespace.NamespaceName();
209+
var thisTypeName = thisType.Name.ToUpperFirstChar();
209210
importStatement = $"\nimport {thisNamespace}.models.extensions.{thisTypeName};";
210211
}
211212

0 commit comments

Comments
 (0)