コード例 #1
0
        public IEnumerable <CustomerSearchModel> GetAll()
        {
            var queryData = from C in _context.Customers
                            select C;

            var result = QueryOperate <Customer> .Execute(queryData);

            result = (IQueryable <Customer>)ExpandOperator.ExpandRelatedEntities <Customer>(result);

            //以下执行完后才会去数据库中查询
            var customers      = result.ToList();
            var customerSearch = CustomerOperator.SetCustomerSearchModelCascade(customers);

            return(customerSearch);
        }
コード例 #2
0
        public IEnumerable <GroupSearchModel> GetAll()
        {
            var queryData = from G in _context.Groups
                            select G;

            var result = QueryOperate <Group> .Execute(queryData);

            result = (IQueryable <Group>)ExpandOperator.ExpandRelatedEntities <Group>(result);

            //以下执行完后才会去数据库中查询
            var groups       = result.ToList();
            var groupsSearch = GroupOperator.SetGroupSearchModelCascade(groups);

            return(groupsSearch);
        }
コード例 #3
0
        public IEnumerable <HolidaySearchModel> GetAll()
        {
            var queryData = from H in _context.Holidays
                            select H;

            var result = QueryOperate <Holiday> .Execute(queryData);

            result = (IQueryable <Holiday>)ExpandOperator.ExpandRelatedEntities <Holiday>(result);

            //以下执行完后才会去数据库中查询
            var holidays       = result.ToList();
            var holidaysSearch = HolidayOperator.SetHolidaySearchModelCascade(holidays);

            return(holidaysSearch);
        }
コード例 #4
0
        public IEnumerable <SceneSearchModel> GetAll()
        {
            var queryData = from S in _context.Scenes
                            select S;

            var result = QueryOperate <Scene> .Execute(queryData);

            result = (IQueryable <Scene>)ExpandOperator.ExpandRelatedEntities <Scene>(result);

            //以下执行完后才会去数据库中查询
            var scenes       = result.ToList();
            var scenesSearch = SceneOperator.SetSceneSearchModelCascade(scenes);

            return(scenesSearch);
        }
コード例 #5
0
        public IEnumerable <AlarmSearchModel> GetAll()
        {
            var queryData = from A in _context.Alarms
                            select A;

            var result = QueryOperate <Alarm> .Execute(queryData);

            result = (IQueryable <Alarm>)ExpandOperator.ExpandRelatedEntities <Alarm>(result);

            //以下执行完后才会去数据库中查询
            var alarms       = result.ToList();
            var alarmsSearch = AlarmOperator.SetAlarmSearchModelCascade(alarms);

            return(alarmsSearch);
        }
コード例 #6
0
        public IEnumerable <LogDescriptionSearchModel> GetAll()
        {
            var queryData = from L in _context.LogDescriptions
                            select L;

            var result = QueryOperate <LogDescription> .Execute(queryData);

            result = (IQueryable <LogDescription>)ExpandOperator.ExpandRelatedEntities <LogDescription>(result);

            //以下执行完后才会去数据库中查询
            var logDescriptions       = result.ToList();
            var logDescriptionsSearch = LogDescriptionOperator.SetLogDescriptionSearchModelCascade(logDescriptions);

            return(logDescriptionsSearch);
        }
コード例 #7
0
        public IEnumerable <DeviceSearchModel> GetAll()
        {
            var queryData = from D in _context.Devices
                            select D;

            var result = QueryOperate <Device> .Execute(queryData);

            result = (IQueryable <Device>)ExpandOperator.ExpandRelatedEntities <Device>(result);

            //以下执行完后才会去数据库中查询
            var devices       = result.ToList();
            var devicesSearch = DeviceOperator.SetDeviceSearchModelCascade(devices);

            return(devicesSearch);
        }
コード例 #8
0
        public async Task <IEnumerable <LogSearchModel> > GetAllAsync()
        {
            var queryData = from L in _context.Logs
                            select L;

            var result = QueryOperate <Log> .Execute(queryData);

            result = (IQueryable <Log>)ExpandOperator.ExpandRelatedEntities <Log>(result);

            //以下执行完后才会去数据库中查询
            var logs = await result.ToListAsync();

            var logsSearch = LogOperator.SetLogSearchModelCascade(logs);

            return(logsSearch);
        }
コード例 #9
0
        public async Task <IEnumerable <UserSearchModel> > GetAllAsync()
        {
            var queryData = from U in _context.Users
                            select U;

            var result = QueryOperate <ApplicationUser> .Execute(queryData);

            result = (IQueryable <ApplicationUser>)ExpandOperator.ExpandRelatedEntities <ApplicationUser>(result);

            //以下执行完后才会去数据库中查询
            var users = await result.ToListAsync();

            var usersSearch = UserOperator.SetUserSearchModelCascade(users);

            return(usersSearch);
        }
コード例 #10
0
        public async Task <IEnumerable <ProjectSearchModel> > GetAllAsync()
        {
            var queryData = from P in _context.Projects
                            select P;

            var result = QueryOperate <Project> .Execute(queryData);

            result = (IQueryable <Project>)ExpandOperator.ExpandRelatedEntities <Project>(result);

            //以下执行完后才会去数据库中查询
            var projects = await result.ToListAsync();

            var projectSearch = ProjectOperator.SetProjectSearchModelCascade(projects);

            return(projectSearch);
        }
コード例 #11
0
        public async Task <IEnumerable <SceneSegmentSearchModel> > GetAllAsync()
        {
            var queryData = from S in _context.SceneSegments
                            select S;

            var result = QueryOperate <SceneSegment> .Execute(queryData);

            result = (IQueryable <SceneSegment>)ExpandOperator.ExpandRelatedEntities <SceneSegment>(result);

            //以下执行完后才会去数据库中查询
            var sceneSegments = await result.ToListAsync();

            var sceneSegmentsSearch = SceneSegmentOperator.SetSceneSegmentSearchModelCascade(sceneSegments);

            return(sceneSegmentsSearch);
        }
コード例 #12
0
        public async Task <IEnumerable <AlarmMessageSearchModel> > GetAllAsync()
        {
            var queryData = from A in _context.AlarmMessages
                            select A;

            var result = QueryOperate <AlarmMessage> .Execute(queryData);

            result = (IQueryable <AlarmMessage>)ExpandOperator.ExpandRelatedEntities <AlarmMessage>(result);

            //以下执行完后才会去数据库中查询
            var alarmMessages = await result.ToListAsync();

            var alarmMessagesSearch = AlarmMessageOperator.SetAlarmMessageSearchModelCascade(alarmMessages);

            return(alarmMessagesSearch);
        }