コード例 #1
0
        public IEnumerable <IConceptInfo> CreateNewConcepts(SubtypeImplementsPropertyInfo conceptInfo, IDslModel existingConcepts)
        {
            var allProperties = existingConcepts.FindByReference <PropertyInfo>(p => p.DataStructure, conceptInfo.IsSubtypeOf.Subtype)
                                .ToDictionary(p => p is ReferencePropertyInfo ? p.Name + "ID" : p.Name);

            var usedColumns    = SqlAnalysis.ExtractPossibleColumnNames(conceptInfo.Expression);
            var usedProperties = usedColumns.Select(c => allProperties.GetValueOrDefault(c)).Where(p => p != null);

            return(usedProperties.Select(p => new SqlDependsOnPropertyInfo
            {
                Dependent = conceptInfo.Dependency_ImplementationView,
                DependsOn = p
            }));
        }
コード例 #2
0
 public IEnumerable <IConceptInfo> CreateNewConcepts(AutoSqlProcedureDependsOnInfo conceptInfo, IDslModel existingConcepts)
 {
     return(SqlAnalysis.GenerateDependencies(conceptInfo.Dependent, existingConcepts, conceptInfo.Dependent.ProcedureSource));
 }
コード例 #3
0
 public IEnumerable <IConceptInfo> CreateNewConcepts(AutoLegacyEntityDependsOnInfo conceptInfo, IDslModel existingConcepts)
 {
     // Legacy entity's view is often created as an SqlView (or similar) in a DSL script of a Rhetos application.
     return(SqlAnalysis.GenerateDependenciesToObject(conceptInfo.Dependent, existingConcepts, conceptInfo.Dependent.View));
 }