Ejemplo n.º 1
0
        // 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 <CrudeDefaultTestModel> FetchWithFilter(System.Guid defaultTestId, string systemName, string testArea, string testSubArea, string testAddress, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeDefaultTestModel>();
            List <CrudeDefaultTestData> dataList = CrudeDefaultTestData.FetchWithFilter(defaultTestId, systemName, testArea, testSubArea, testAddress, userId, dateTime);

            foreach (CrudeDefaultTestData data in dataList)
            {
                var crudeDefaultTestBusinessModel = new CrudeDefaultTestModel();
                DataToModel(data, crudeDefaultTestBusinessModel);
                list.Add(crudeDefaultTestBusinessModel);
            }

            return(list);
        }
Ejemplo n.º 2
0
        // 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 <CrudeDefaultTestContract> FetchWithFilter(System.Guid defaultTestId, string systemName, string testArea, string testSubArea, string testAddress, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeDefaultTestContract>();
            List <CrudeDefaultTestData> dataList = CrudeDefaultTestData.FetchWithFilter(
                defaultTestId: defaultTestId,
                systemName: systemName,
                testArea: testArea,
                testSubArea: testSubArea,
                testAddress: testAddress,
                userId: userId,
                dateTime: dateTime
                );

            foreach (CrudeDefaultTestData data in dataList)
            {
                var crudeDefaultTestContract = new CrudeDefaultTestContract();
                DataToContract(data, crudeDefaultTestContract);
                list.Add(crudeDefaultTestContract);
            }

            return(list);
        }