0
我有一個表「表1」,其結構如下..轉化爲IEnumerable C#
public class Table1
{
public int Id { get; set; }
public string SchemaName { get; set; }
public string PropertyName { get; set; }
public string PropertyType { get; set; }
}
使用實體框架,我可以得到的數據出來作爲一個IEnumerable。
但我需要的數據爲IEnumerable,其結構如下:
public class myschemaobj
{
public string SchemaName { get; set; }
public List<mypropobj> PropertyObjects { get; set; }
}
public class mypropobj
{
public string PropertyName { get; set; }
public string PropertyType { get; set; }
}
所有幫助表示衷心感謝。
感謝
看起來你需要用'SchemaName'組。你有什麼嘗試? – juharr