Skip to content

Commit

Permalink
Fixed #869 Use constants for primary attributes from EBG
Browse files Browse the repository at this point in the history
  • Loading branch information
rappen committed Apr 20, 2024
1 parent d707a73 commit 0f3c4ca
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions FetchXmlBuilder/Converters/CSharpCodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1166,6 +1166,17 @@ private string GetCodeAttribute(string entityname, string attributename, bool ad
case QExFlavorEnum.LCGconstants:
return LCG.Extensions.GetEntityClass(entity, settings.LCG_Settings) + "." + LCG.Extensions.GetAttributeProperty(attribute, settings.LCG_Settings);

case QExFlavorEnum.EBGconstants:
if (attribute.IsPrimaryId == true)
{
return entity.SchemaName + ".PrimaryIdAttribute";
}
if (attribute.IsPrimaryName == true)
{
return entity.SchemaName + ".PrimaryNameAttribute";
}
return entity.SchemaName + "." + settings.EBG_AttributeLogicalNameClass + attribute.CapitSchemaName(settings.QExFlavor);

default:
return entity.SchemaName + "." + settings.EBG_AttributeLogicalNameClass + attribute.CapitSchemaName(settings.QExFlavor);
}
Expand Down

0 comments on commit 0f3c4ca

Please sign in to comment.