public static XQAllOutBlocks ReadFromDB(string tableNamePostfix = null /*, string shcode = default,char futcheck = default,string date = default,string cts_code = default,string lastdate = default,int cnt = default */) { using (XQt2203 instance = new XQt2203()) { XQAllOutBlocks results = new XQAllOutBlocks(); string tableName = (tableNamePostfix == null) ? "XQt2203OutBlock" : $"XQt2203OutBlock_{tableNamePostfix}"; QueryOption qo = new QueryOption(tableName); results.OutBlock = instance.Select <XQt2203OutBlock>(qo); tableName = (tableNamePostfix == null) ? "XQt2203OutBlock1" : $"XQt2203OutBlock1_{tableNamePostfix}"; qo = new QueryOption(tableName); results.OutBlock1 = instance.SelectMany <XQt2203OutBlock1>(qo); return(results); } }