Raghunath Pentela

Raghunath Pentela

  • NA
  • 59
  • 4.4k

Entity Framework

May 16 2019 2:12 AM
APP_COILS AND VIS_CONFIG are two EF model  entities i have
 
I want to set displayname of APP_COILS fields (SCH_NO,IP_NO) by querying VIS_CONFIG fields(FIELDDESCRIPTION mapped to fieldname)
 
APP_COILS Data
 
SCH_NO         IP_NO
08LECL10078GP250700YG
09AECL10068GP797800ZG
09BECL10121GR276300ZG
 
VIS_CONFIG Data
 
 
SOURCENAME   FIELDNAME   FIELDDESCRIPTION
APP_COILS         SCH_NO            Schedule No. -> SHOULD BE DISPLAYNAME OF SCH_NO                                                                                        of app_coils
APP_COILS         IP_NO                  Coil No          -> SHOULD BE DISPLAYNAME OF                                                                                           IP_NO of app_coilsentity
 
Below are my entity models
 
Note: by query or code behind not hardcoding displayname 
 
namespace MaterialDesignDemo.Models
{
using System;
using System.Collections.Generic;
public partial class APP_COILS
{
public string SCH_NO { get; set; }
public string IP_NO { get; set; }
}
}
 
namespace MaterialDesignDemo.Models
{
using System;
using System.Collections.Generic;
public partial class VIS_CONFIG
{
public string SOURCENAME { get; set; }
public string FIELDNAME { get; set; }
public string FIELDDESCRIPTION { get; set; }
}
}