// fetch all from table into new List of class instances, filtered by any column // links: // docLink: http://sql2x.org/documentationLink/db27658d-4d23-46d7-9970-7bbaef8634b0 public List <CrudeFinancialTaxModel> FetchWithFilter(System.Guid financialTaxId, string financialTaxTypeRcd, decimal amount, System.Guid financialCurrencyId, System.Guid userId, System.DateTime dateTime) { var list = new List <CrudeFinancialTaxModel>(); List <CrudeFinancialTaxData> dataList = CrudeFinancialTaxData.FetchWithFilter(financialTaxId, financialTaxTypeRcd, amount, financialCurrencyId, userId, dateTime); foreach (CrudeFinancialTaxData data in dataList) { var crudeFinancialTaxBusinessModel = new CrudeFinancialTaxModel(); DataToModel(data, crudeFinancialTaxBusinessModel); list.Add(crudeFinancialTaxBusinessModel); } return(list); }
// fetch all rows from table into new List of Contracts, filtered by any column // links: // docLink: http://sql2x.org/documentationLink/ce01ef4a-5cd0-4e51-b211-9c0a15b791a0 public List <CrudeFinancialTaxContract> FetchWithFilter(System.Guid financialTaxId, string financialTaxTypeRcd, decimal amount, System.Guid financialCurrencyId, System.Guid userId, System.DateTime dateTime) { var list = new List <CrudeFinancialTaxContract>(); List <CrudeFinancialTaxData> dataList = CrudeFinancialTaxData.FetchWithFilter( financialTaxId: financialTaxId, financialTaxTypeRcd: financialTaxTypeRcd, amount: amount, financialCurrencyId: financialCurrencyId, userId: userId, dateTime: dateTime ); foreach (CrudeFinancialTaxData data in dataList) { var crudeFinancialTaxContract = new CrudeFinancialTaxContract(); DataToContract(data, crudeFinancialTaxContract); list.Add(crudeFinancialTaxContract); } return(list); }