@@ -314,6 +314,13 @@ public string GetEntityUpdateAsyncMethod(OdcmClass odcmClass)
314314
315315public string GetExpandExpressionMethod(string requestType, string underlyingType)
316316{
317+
318+ // Special case for when an entity name ends with "Request". Associated with the change in EntityType.cs.tt
319+ if (underlyingType.EndsWith("Request"))
320+ {
321+ underlyingType = String.Concat(underlyingType, "Object");
322+ }
323+
317324 var stringBuilder = new StringBuilder();
318325
319326 stringBuilder.Append(
@@ -346,6 +353,13 @@ public string GetExpandMethod(string entityRequest)
346353
347354public string GetSelectExpressionMethod(string requestType, string underlyingType)
348355{
356+
357+ // Special case for when an entity name ends with "Request". Associated with the change in EntityType.cs.tt
358+ if (underlyingType.EndsWith("Request"))
359+ {
360+ underlyingType = String.Concat(underlyingType, "Object");
361+ }
362+
349363 var stringBuilder = new StringBuilder();
350364
351365 stringBuilder.Append(
@@ -380,13 +394,6 @@ public string GetSelectMethod(string entityRequest)
380394public string GetEntityExpandMethods(OdcmClass odcmClass)
381395{
382396 string entityName = this.GetEntityNameString(odcmClass);
383-
384- // Special case for when an entity name ends with "Request". Associated with the change in EntityType.cs.tt
385- if (entityName.EndsWith("Request"))
386- {
387- entityName = String.Concat(entityName, "Object");
388- }
389-
390397 return this.GetExpandMethod(this.GetRequestString(entityName)) +
391398 Environment.NewLine + Environment.NewLine + " " +
392399 this.GetExpandExpressionMethod(this.GetRequestString(entityName), entityName);
@@ -395,13 +402,6 @@ public string GetEntityExpandMethods(OdcmClass odcmClass)
395402public string GetEntitySelectMethods(OdcmClass odcmClass)
396403{
397404 string entityName = this.GetEntityNameString(odcmClass);
398-
399- // Special case for when an entity name ends with "Request". Associated with the change in EntityType.cs.tt
400- if (entityName.EndsWith("Request"))
401- {
402- entityName = String.Concat(entityName, "Object");
403- }
404-
405405 return this.GetSelectMethod(this.GetRequestString(entityName)) +
406406 Environment.NewLine + Environment.NewLine + " " +
407407 this.GetSelectExpressionMethod(this.GetRequestString(entityName), entityName);
0 commit comments