Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting 'column' properties
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Getting 'column' properties
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01619178
Message ID:
01619178
Vues:
40
Hi everybody,

I have a model class which is modeled after a view using Reverse POCO Generator. I am returning that view back. My question is - how can I get back to the properties of each column (e.g. for example, public String Salespoint {get;set;} - I need to get 'Salespoint' back)?

In other words, I started this code
 foreach (var col in searchViewModel.Result.List) // List is IEnumerable of SalesPointsLicensesList class
            {
                
            }
I need to know the name of the column (class property) and its value. How can I get the name of the property here?

Thanks in advance.

UPDATE. Looks like I would need to use reflection and PropertyInfo class.
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform