예제 #1
0
        public AlarmSearchModel FindById(int alarmId)
        {
            var result = _context.Alarms.Where(v => v.AlarmId == alarmId);

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

            var alarm       = result.FirstOrDefault();
            var alarmSearch = AlarmOperator.SetAlarmSearchModelCascade(alarm);

            return(alarmSearch);
        }
예제 #2
0
        public ProjectSearchModel FindById(int projectId)
        {
            var result = _context.Projects.Where(v => v.ProjectId == projectId);

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

            var project       = result.FirstOrDefault();
            var projectSearch = ProjectOperator.SetProjectSearchModelCascade(project);

            return(projectSearch);
        }
예제 #3
0
        public CustomerSearchModel FindById(int customerId)
        {
            var result = _context.Customers.Where(c => c.CustomerId == customerId);

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

            var customer       = result.FirstOrDefault();
            var customerSearch = CustomerOperator.SetCustomerSearchModelCascade(customer);

            return(customerSearch);
        }
예제 #4
0
        public SceneSearchModel FindById(int sceneId)
        {
            var result = _context.Scenes.Where(v => v.SceneId == sceneId);

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

            var scene       = result.FirstOrDefault();
            var sceneSearch = SceneOperator.SetSceneSearchModelCascade(scene);

            return(sceneSearch);
        }
예제 #5
0
        public HolidaySearchModel FindById(int holidayId)
        {
            var result = _context.Holidays.Where(v => v.HolidayId == holidayId);

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

            var holiday       = result.FirstOrDefault();
            var holidaySearch = HolidayOperator.SetHolidaySearchModelCascade(holiday);

            return(holidaySearch);
        }
예제 #6
0
        public GroupSearchModel FindById(int groupId)
        {
            var result = _context.Groups.Where(v => v.GroupId == groupId);

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

            var group       = result.FirstOrDefault();
            var groupSearch = GroupOperator.SetGroupSearchModelCascade(group);

            return(groupSearch);
        }
예제 #7
0
        public DeviceSearchModel FindById(int deviceId)
        {
            var result = _context.Devices.Where(v => v.DeviceId == deviceId);

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

            var device       = result.FirstOrDefault();
            var deviceSearch = DeviceOperator.SetDeviceSearchModelCascade(device);

            return(deviceSearch);
        }
예제 #8
0
        public LogSearchModel FindById(int logId)
        {
            var result = _context.Logs.Where(v => v.LogId == logId);

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

            var log       = result.FirstOrDefault();
            var logSearch = LogOperator.SetLogSearchModelCascade(log);

            return(logSearch);
        }
예제 #9
0
        public async Task <UserSubSearchModel> FindByIdAsync(string userId)
        {
            var result = _context.Users.Where(v => v.Id == userId);

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

            var user = await result.FirstOrDefaultAsync();

            var userSearch = UserOperator.SetUserSearchModelCascade(user);

            return(userSearch);
        }
예제 #10
0
        public async Task <LocationSearchModel> FindByIdAsync(int locationId)
        {
            var result = _context.Locations.Where(v => v.LocationId == locationId);

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

            var location = await result.FirstOrDefaultAsync();

            var locationSearch = LocationOperator.SetLocationSearchModelCascade(location);

            return(locationSearch);
        }
예제 #11
0
        public async Task <SceneSegmentSearchModel> FindByIdAsync(int sceneSegmentId)
        {
            var result = _context.SceneSegments.Where(v => v.SceneSegmentId == sceneSegmentId);

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

            var sceneSegment = await result.FirstOrDefaultAsync();

            var sceneSegmentSearch = SceneSegmentOperator.SetSceneSegmentSearchModelCascade(sceneSegment);

            return(sceneSegmentSearch);
        }
예제 #12
0
        public async Task <AlarmMessageSearchModel> FindByIdAsync(int alarmMessageId)
        {
            var result = _context.AlarmMessages
                         .Where(v => v.AlarmMessageId == alarmMessageId);

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

            var alarmMessage = await result.FirstOrDefaultAsync();

            var alarmMessageSearch = AlarmMessageOperator.SetAlarmMessageSearchModelCascade(alarmMessage);

            return(alarmMessageSearch);
        }
예제 #13
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);
        }
예제 #14
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);
        }
예제 #15
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);
        }
예제 #16
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);
        }
예제 #17
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);
        }
예제 #18
0
        public IEnumerable <LogSearchModel> GetAll()
        {
            var queryData = from L in _context.Logs
                            select L;

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

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

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

            return(logsSearch);
        }
예제 #19
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);
        }
예제 #20
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);
        }
예제 #21
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);
        }
        public async Task <IEnumerable <LogDescriptionSearchModel> > GetAllAsync()
        {
            var queryData = from L in _context.LogDescriptions
                            select L;

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

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

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

            var logDescriptionsSearch = LogDescriptionOperator.SetLogDescriptionSearchModelCascade(logDescriptions);

            return(logDescriptionsSearch);
        }
예제 #23
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);
        }
예제 #24
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);
        }