I have a requirement to add a property in existing class as per user configuration, I mean if the user has been configured in the database to add a new property like property Name is 'Name', the datatype is 'string' and value is 'Mishra'. After achieving this, I will save a list of TestClass data in Redis cache.
class TestClass
{
public long ID { get; set; }
}
I have tried from the link https://msdn.microsoft.com/en-us/library/2sd82fz7.aspx but I want to add an existing class, so can anyone please help me to achieve the same.
I want to render JSON data as per user property (column) configuration for my devex grid.
Data Like-
{
"testClass": [
{
"scheduledTime": "2018-07-30T15:30:00",
"estimatedTime": "2018-07-30T15:30:00",
"flightNumber": "EY4512",
"airLine": "assets/images/EY_88x45.jpg",
"fromVia": "Chengdu,Dallas",
"partner": "EY2356",
"status": "Departed",
"flightColor": null,
"cityColor": null,
"publicArrivalPlaceholder1": "CTU,DFW",
"publicArrivalPlaceholder2": "12_IT",
"publicArrivalPlaceholder3": "AIR",
"publicArrivalPlaceholder4": "7/30/2018 3:30:00 PM",
"publicArrivalPlaceholder5": "7/30/2018 3:30:00 PM",
"id": "179490",
"cellRule": "",
"rowRule": ""
},
{
"scheduledTime": "2018-07-30T17:00:00",
"estimatedTime": "2018-07-30T14:00:00",
"flightNumber": "EY1213",
"airLine": "assets/images/EY_88x45.jpg",
"fromVia": "Adelaide,Ahmedabad",
"partner": "EY8562",
"status": "Departed",
"flightColor": null,
"cityColor": null,
"publicArrivalPlaceholder1": "ADE,AMD",
"publicArrivalPlaceholder2": "2A_T4",
"publicArrivalPlaceholder3": "AIR",
"publicArrivalPlaceholder4": "7/30/2018 5:00:00 PM",
"publicArrivalPlaceholder5": "7/30/2018 2:00:00 PM",
"id": "179489",
"cellRule": "",
"rowRule": ""
}]
}
Here scheduledTime, estimatedTime, flightNumber etc are property that i need to resolve at run-time.