// 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 <CrudeExternalSystemModel> FetchWithFilter(System.Guid externalSystemId, string externalSystemCode, string externalSystemName, System.Guid userId, System.DateTime dateTime) { var list = new List <CrudeExternalSystemModel>(); List <CrudeExternalSystemData> dataList = CrudeExternalSystemData.FetchWithFilter(externalSystemId, externalSystemCode, externalSystemName, userId, dateTime); foreach (CrudeExternalSystemData data in dataList) { var crudeExternalSystemBusinessModel = new CrudeExternalSystemModel(); DataToModel(data, crudeExternalSystemBusinessModel); list.Add(crudeExternalSystemBusinessModel); } 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 <CrudeExternalSystemContract> FetchWithFilter(System.Guid externalSystemId, string externalSystemCode, string externalSystemName, System.Guid userId, System.DateTime dateTime) { var list = new List <CrudeExternalSystemContract>(); List <CrudeExternalSystemData> dataList = CrudeExternalSystemData.FetchWithFilter( externalSystemId: externalSystemId, externalSystemCode: externalSystemCode, externalSystemName: externalSystemName, userId: userId, dateTime: dateTime ); foreach (CrudeExternalSystemData data in dataList) { var crudeExternalSystemContract = new CrudeExternalSystemContract(); DataToContract(data, crudeExternalSystemContract); list.Add(crudeExternalSystemContract); } return(list); }