Beispiel #1
0
        public static void GenerateProxiesFromDb(string path, string @namespace, string connStr,
                                                 IEnumerable <string> tableNames = null, IEnumerable <string> udttNames = null, string schema = "dbo")
        {
            var sqlConnStr = new SqlConnectionString(connStr);

            sqlConnStr.GenerateProxiesFromDb(
                tableNames ?? sqlConnStr.GetDbObjectNames(TableType.TableOrView, null, schema),
                udttNames ?? sqlConnStr.GetDbObjectNames(TableType.Udtt, null, schema),
                path, @namespace, schema
                );
        }
Beispiel #2
0
        public static void GenerateProxiesFromDb(string path, string @namespace, string connStr,
                                                 string prefix = null, bool includeTablesAndViews = true, bool includeUdtts = true, string schema = "dbo")
        {
            var sqlConnStr = new SqlConnectionString(connStr);

            sqlConnStr.GenerateProxiesFromDb(
                includeTablesAndViews ? sqlConnStr.GetDbObjectNames(TableType.TableOrView, prefix, schema) : null,
                includeUdtts ? sqlConnStr.GetDbObjectNames(TableType.Udtt, prefix, schema) : null,
                path, @namespace, schema
                );
        }
Beispiel #3
0
 private static void GenerateProxiesFromDb(this SqlConnectionString sqlConnStr, IEnumerable <string> tableNames, IEnumerable <string> udttNames,
                                           string path, string @namespace, string schema)
 {
     sqlConnStr.GenerateProxiesFromDb(tableNames, TableType.TableOrView, path, @namespace, schema);
     sqlConnStr.GenerateProxiesFromDb(udttNames, TableType.Udtt, path, @namespace, schema);
 }