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 })); }
public IEnumerable <IConceptInfo> CreateNewConcepts(AutoSqlProcedureDependsOnInfo conceptInfo, IDslModel existingConcepts) { return(SqlAnalysis.GenerateDependencies(conceptInfo.Dependent, existingConcepts, conceptInfo.Dependent.ProcedureSource)); }
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)); }