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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }