// 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 <CrudeProductModel> FetchWithFilter(System.Guid productId, string productName, string stateRcd, System.Guid userId, System.DateTime dateTime, System.Guid productBecameId) { var list = new List <CrudeProductModel>(); List <CrudeProductData> dataList = CrudeProductData.FetchWithFilter(productId, productName, stateRcd, userId, dateTime, productBecameId); foreach (CrudeProductData data in dataList) { var crudeProductBusinessModel = new CrudeProductModel(); DataToModel(data, crudeProductBusinessModel); list.Add(crudeProductBusinessModel); } 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 <CrudeProductContract> FetchWithFilter(System.Guid productId, string productName, string stateRcd, System.Guid userId, System.DateTime dateTime, System.Guid productBecameId) { var list = new List <CrudeProductContract>(); List <CrudeProductData> dataList = CrudeProductData.FetchWithFilter( productId: productId, productName: productName, stateRcd: stateRcd, userId: userId, dateTime: dateTime, productBecameId: productBecameId ); foreach (CrudeProductData data in dataList) { var crudeProductContract = new CrudeProductContract(); DataToContract(data, crudeProductContract); list.Add(crudeProductContract); } return(list); }