Click here to Skip to main content
12,504,695 members (62,968 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# WPF Silverlight C#4.0
Can generate "entity class" dynamically ? Is there such examples?

Description:

There is a entity class "TableList", it's properties is dynamic generation. It should be accurate say , the number of its properties is dynamic.


1, Providing parameters "ColumnCount", according to it specified the "TableList properties" number.

2, If "ColumnCount" is "2", then entity class "TableList" there is attribute "Column1", "Column2".

3, If "ColumnCount" is "3", then entity class "TableList" there is attribute "Column1", "Column2","Column3".


4, If "ColumnCount" is "4", then entity class "TableList" there is attribute "Column1", "Column2","Column3","Column4".

5,So on.

So on purpose:
Mainly is to solve the problem of "DataGrid" binding. Wanting the "column number" of "entity set" which binds to "DataGrid" can be dynamic.
Posted 31-Jul-12 16:33pm

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

May be you can search on Google about "Dynamic class" on Silverlight.

Regards
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160919.1 | Last Updated 1 Aug 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100