public List <Detail> GetAllIoTHub() { DBHelper._IoTHub dbhelp = new DBHelper._IoTHub(); var iotHubList = dbhelp.GetAll(); if (iotHubList == null) { throw new CDSException(10901); } return(dbhelp.GetAll().Select(s => new Detail() { Id = s.Id, IoTHubName = s.IoTHubName, Description = s.Description, CompanyId = s.Company == null ? "" : s.Company.Id.ToString(), CompanyName = s.Company == null ? "" : s.Company.Name, IoTHubEndPoint = s.IoTHubEndPoint, IoTHubConnectionString = s.IoTHubConnectionString, EventConsumerGroup = s.EventConsumerGroup, EventHubStorageConnectionString = s.EventHubStorageConnectionString, UploadContainer = s.UploadContainer }).ToList <Detail>()); }
public List <Detail> GetAllIoTHub() { DBHelper._IoTHub dbhelp = new DBHelper._IoTHub(); return(dbhelp.GetAll().Select(s => new Detail() { IoTHubAlias = s.IoTHubAlias, Description = s.Description, CompanyId = s.Company == null ? "" : s.Company.Id.ToString(), CompanyName = s.Company == null ? "" : s.Company.Name, P_IoTHubEndPoint = s.P_IoTHubEndPoint, P_IoTHubConnectionString = s.P_IoTHubConnectionString, P_EventConsumerGroup = s.P_EventConsumerGroup, P_EventHubStorageConnectionString = s.P_EventHubStorageConnectionString, P_UploadContainer = s.P_UploadContainer, S_IoTHubEndPoint = s.S_IoTHubEndPoint, S_IoTHubConnectionString = s.S_IoTHubConnectionString, S_EventConsumerGroup = s.S_EventConsumerGroup, S_EventHubStorageConnectionString = s.S_EventHubStorageConnectionString, S_UploadContainer = s.S_UploadContainer }).ToList <Detail>()); }