public EntityCommand(string commandName, string description, EntityCommandKind kind, EntityInfo entity, EntityKeyInfo selectKey = null) : this(commandName, description, kind) { TargetEntityInfo = entity; Area = entity.Area; TargetEntityType = entity.EntityType; SelectKey = selectKey; }
public LinqCommandInfo CountCommand; //counts child records for a given parent - used by CanDelete() method public EntityReferenceInfo(EntityMemberInfo fromMember, EntityKeyInfo fromKey, EntityKeyInfo toKey) { FromMember = fromMember; FromKey = fromKey; ToKey = toKey; ToKey.Entity.Flags |= EntityFlags.IsReferenced; var fromEnt = fromMember.Entity; //if it is ref from table, register incoming reference if (fromEnt.Kind == EntityKind.Table) { ToKey.Entity.IncomingReferences.Add(fromMember); } if (fromEnt == ToKey.Entity) { fromEnt.Flags |= EntityFlags.SelfReferencing; } }