Esempio n. 1
0
        public string Generate(GenerationParameters generationParameters)
        {
            var databaseAnalyzer = new Analyzer.DatabaseAnalyzer(null);

            //var storedProcedureSchema = databaseAnalyzer.GetStoredProcedureSchema("server=localhost;database=npirocanac_unit_test_for_codegeneration;trusted_connection=true;", new Analyzer.SysObjectRecord("ap_RainbowTable_SelectAllRainbowTable", "dbo"));


            var webservice = databaseAnalyzer.GetStoredProcedureSchema("server=tndevsql;database=tnow;trusted_connection=true;", new Analyzer.SysObjectRecord("WebService_SearchTickets", "dbo"));


            return(String.Empty);
        }
Esempio n. 2
0
        public DALHelperMethod(GenerationParameters generationParameters, StoredProcedureSchema storedProcedureSchema, GeneratedTypes entityType)
        {
            _storedProcedureSchema = storedProcedureSchema;

            var parsedNames = Utility.ParseStoredProcedureName(storedProcedureSchema.Name);

            //var sqlConnection = new SqlConnection(generationParameters.ConnectionString);

            ConnectionKey            = generationParameters.ConnectionKey;
            DatabaseObjectOwner      = generationParameters.DatabaseObjectOwner;
            EntityType               = entityType;
            MethodName               = parsedNames.HelperMethodName;
            CommandTimeout           = generationParameters.CommandTimeout;
            EntityName               = parsedNames.EntityName;
            Database                 = generationParameters.ConnectionKey;
            StoredProcedureName      = storedProcedureSchema.Name;
            EnableTransactionSupport = generationParameters.EnableTransactionSupport;
        }
Esempio n. 3
0
        public DALTemplate(GenerationParameters generationParameters)
        {
            GenerationParameters = generationParameters;

            switch (generationParameters.DatabaseType)
            {
            case DatabaseType.SqlServer:
                DatabaseAnalyzer = new DatabaseAnalyzer(this);
                break;

            case DatabaseType.MySQL:
                DatabaseAnalyzer = new MySqlDatabaseAnalyzer(this);
                break;

            default:
                throw new NotSupportedException(generationParameters.DatabaseType.ToString());
            }



            //var webservice = DatabaseAnalyzer.GetStoredProcedureSchema("server=tndevsql;database=tnow;trusted_connection=true;", new Analyzer.SysObjectRecord("WebService_SearchTickets", "dbo"));
        }