Esempio n. 1
0
 // Used for INullEntity, fake entity for special queries
 internal EntityInfo(Type entityType)
 {
     EntityType = entityType;
     Kind       = EntityKind.Table;
     Name       = entityType.Name;
     Members    = new List <EntityMemberInfo>();
     Events     = new EntityEvents();
     FullName   = Name;
 }
Esempio n. 2
0
 public EntityInfo(EntityModule module, Type entityType, EntityKind kind = EntityKind.Table, EntityArea altArea = null)
 {
     Module     = module;
     EntityType = entityType;
     Area       = altArea ?? Module.Area;
     Kind       = kind;
     Name       = entityType.Name;
     Members    = new List <EntityMemberInfo>();
     Events     = new EntityEvents();
     //Check for generic types - happens in modules with generic entities (interfaces), provided for customization
     if (Name.Contains('`'))
     {
         Name = Name.Substring(0, Name.IndexOf('`'));
     }
     if (EntityType.IsInterface && Name.Length > 1 && Name.StartsWith("I"))
     {
         Name = Name.Substring(1);
     }
     FullName          = Area.Name + "." + Name;
     EntitySetConstant = ExpressionMaker.MakeEntitySetConstant(this.EntityType);
 }