C# 我可以在运行时创建实体名称吗?尝试实例化一个新的;“按层次划分的表格”;(待定)实体
我使用TPH创建了一个表ie的特殊实例C# 我可以在运行时创建实体名称吗?尝试实例化一个新的;“按层次划分的表格”;(待定)实体,c#,linq,entity-framework,linq-to-entities,C#,Linq,Entity Framework,Linq To Entities,我使用TPH创建了一个表ie的特殊实例 section <- introduction-section 提前感谢。使用反射,您应该能够在运行时实例化对象。看一下,它提供了几个重载来创建对象的实例也许?边注:考虑不使用TLA,像TBH,TPH…另外,“创建类名”读起来就像你想创建新的类,这在关于TLA问题的后期编辑问题中没有提到。我认为我的创建类是我的一个错误。我想创建一个新实体。 section <- conclusion-section String strSectionCod
section <- introduction-section
提前感谢。使用反射,您应该能够在运行时实例化对象。看一下,它提供了几个重载来创建对象的实例也许?边注:考虑不使用TLA,像TBH,TPH…另外,“创建类名”读起来就像你想创建新的
类
,这在关于TLA问题的后期编辑问题中没有提到。我认为我的创建类是我的一个错误。我想创建一个新实体。
section <- conclusion-section
String strSectionCode = "I"
string strFullName = strSectionCode + "_" + "Section";
var myNewSection = new strFullname ??? () // I know this is not possible, but it shows where I am trying to get to.