// 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 <CrudeCartProductModel> FetchWithFilter(System.Guid cartProductId, System.Guid productId, decimal amount, System.Guid financialCurrencyId, string stateRcd, System.Guid userId, System.DateTime dateTime) { var list = new List <CrudeCartProductModel>(); List <CrudeCartProductData> dataList = CrudeCartProductData.FetchWithFilter(cartProductId, productId, amount, financialCurrencyId, stateRcd, userId, dateTime); foreach (CrudeCartProductData data in dataList) { var crudeCartProductBusinessModel = new CrudeCartProductModel(); DataToModel(data, crudeCartProductBusinessModel); list.Add(crudeCartProductBusinessModel); } 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 <CrudeCartProductContract> FetchWithFilter(System.Guid cartProductId, System.Guid productId, decimal amount, System.Guid financialCurrencyId, string stateRcd, System.Guid userId, System.DateTime dateTime) { var list = new List <CrudeCartProductContract>(); List <CrudeCartProductData> dataList = CrudeCartProductData.FetchWithFilter( cartProductId: cartProductId, productId: productId, amount: amount, financialCurrencyId: financialCurrencyId, stateRcd: stateRcd, userId: userId, dateTime: dateTime ); foreach (CrudeCartProductData data in dataList) { var crudeCartProductContract = new CrudeCartProductContract(); DataToContract(data, crudeCartProductContract); list.Add(crudeCartProductContract); } return(list); }