mikeg22 wrote:
There's a GeneralEntityFactory in the HelperFunctions/EntityFactories file...
You can also get the value of an enum through the enum name. Using this in conjunction with the GeneralEntityFactory should get you what you want.
string name = "OrderDetailsEntity";
int entityTypeValue = 0;
int[] values = (int[])System.Enum.GetValues(typeof(EntityType));
for (int x = 0; x < values.Length; x++)
{
if (System.Enum.GetName(typeof(EntityType), x) == name)
{
entityTypeValue = x;
}
}
IEntity2 entity = GeneralEntityFactory.Create((EntityType)entityTypeValue);
HTH,
Phil