Hi,
One way is:
// Set the name
string entityName = "ModuleEntity";
EntityType typeOfEntity = (EntityType)Enum.Parse(typeof(EntityType), entityName, false);
IEntity entityInstance = GeneralEntityFactory.Create(typeOfEntity);
IEntity loadedEntity = Activator.CreateInstance(entityInstance.GetType(), new object[] { 2 }) as IEntity;
// Fetch info from the retrieved entity
this.Title = loadedEntity.Fields["NameShort"].CurrentValue.ToString();
Where "2" is the primary key value and "ModuleEntity" the entity name
But I'm still looking for the other solution and maybe better performing solutions.
Cheers,
Gab