using System; using System.Collections.Generic; using System.Reflection; using System.Text; namespace APT.Infrastructure.Core { public class EFModel { List _tables = null; public EFModel() { _tables = new List(); } public List Tables { get { return _tables; } } } public class EFModelTable { List _foreignKeys = null; List _allForeignKeys = null; List _fields = null; public EFModelTable() { _foreignKeys = new List(); _fields = new List(); _allForeignKeys = new List(); } public string Name { get; set; } public List ForeignKeys { get { return _foreignKeys; } } public List Fields { get { return _fields; } } public List AllForeignKeys { get { return _allForeignKeys; } } } public class EFModelField { public EFModelField() { } public bool IsNull { get; set; } public string Name { get; set; } public string TypeName { get; set; } public Type FieldType { get; set; } public PropertyInfo PropertyInfo { get; set; } public new string ToString() { if (string.IsNullOrEmpty(this.Name)) return "EFModelField"; return this.Name + ":" + this.TypeName; } } public class EFModelForeignKey { public EFModelForeignKey() { } public string Name { get; set; } public bool IsNull { get; set; } public string ForeignFieldName { get; set; } public string ForeignNavName { get; set; } public string ForeignTableName { get; set; } public dynamic ForeignKey { get; set; } public string MasterNavName { get; set; } } }