// 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 <CrudeDefaultVersionModel> FetchWithFilter(System.Guid defaultVersionId, string funVersion, string number, int majorNumber, int minorNumber, int sequenceNumber, System.Guid defaultUserId, System.DateTime dateTime) { var list = new List <CrudeDefaultVersionModel>(); List <CrudeDefaultVersionData> dataList = CrudeDefaultVersionData.FetchWithFilter(defaultVersionId, funVersion, number, majorNumber, minorNumber, sequenceNumber, defaultUserId, dateTime); foreach (CrudeDefaultVersionData data in dataList) { var crudeDefaultVersionBusinessModel = new CrudeDefaultVersionModel(); DataToModel(data, crudeDefaultVersionBusinessModel); list.Add(crudeDefaultVersionBusinessModel); } 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 <CrudeDefaultVersionContract> FetchWithFilter(System.Guid defaultVersionId, string funVersion, string number, int majorNumber, int minorNumber, int sequenceNumber, System.Guid defaultUserId, System.DateTime dateTime) { var list = new List <CrudeDefaultVersionContract>(); List <CrudeDefaultVersionData> dataList = CrudeDefaultVersionData.FetchWithFilter( defaultVersionId: defaultVersionId, funVersion: funVersion, number: number, majorNumber: majorNumber, minorNumber: minorNumber, sequenceNumber: sequenceNumber, defaultUserId: defaultUserId, dateTime: dateTime ); foreach (CrudeDefaultVersionData data in dataList) { var crudeDefaultVersionContract = new CrudeDefaultVersionContract(); DataToContract(data, crudeDefaultVersionContract); list.Add(crudeDefaultVersionContract); } return(list); }