Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> Most straightforward way of getting field name (string) from field index (enum)
 

Pages: 1
LLBLGen Pro Runtime Framework
Most straightforward way of getting field name (string) from field index (enum)
Page:1/1 

  Print all messages in this thread  
Poster Message
saggett
User



Location:
Manchester, UK
Joined on:
12-Nov-2007 15:44:46
Posted:
50 posts
# Posted on: 03-Nov-2008 18:02:45.  
Using LLBLGen 2.6, Adapter pattern, .NET 3.5.

At the moment I've got:

Code:
IEntityFields2 fields = EntityFieldsFactory.CreateEntityFieldsObject(EntityType.SensitivityEntity);
return fields[(int)SensitivityFieldIndex.CustomerProfileTypeId].Name;


But is there a way of getting a field name (string) using one of the field enums without creating IEntityFields2 objects?
  Top
daelmo
Support Team



Location:
Guatemala City
Joined on:
28-Nov-2005 23:35:24
Posted:
8098 posts
# Posted on: 04-Nov-2008 06:20:39.  
Some ways I can think:    
Code:
string name = CustomersFields.Address.Name;

string name = SensitivityFieldIndex.CustomerProfileTypeId.ToString();

IEntityFields2 fields = EntityFieldsFactory.CreateEntityFieldsObject(EntityType.SensitivityEntity);
string name = fields[(int)SensitivityFieldIndex.CustomerProfileTypeId].Name;




David Elizondo
LLBLGen'ing (articles and code snippets) | linkedin | twitter
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.