/**************************** Get ****************************/

        public List <Site> GetSitesInDomain(int DomainId)
        {
            try
            {
                iotSharedEntityContext <Site> cont = new iotSharedEntityContext <Site>();
                List <Site> sites = cont.GetAll().Where(s => s.Domain.Id == DomainId).ToList();
                return(sites);
            }
            catch (Exception e)
            {
                nlogger.ErrorException(e.Message, e);
                return(new List <Site>());
            }
        }
 public List <Device> GetAllDevices()
 {
     try
     {
         iotSharedEntityContext <Device> propCont = new iotSharedEntityContext <Device>();
         List <Device> stored = propCont.GetAll().ToList();
         if (stored != null)
         {
             return(stored);
         }
         return(null);
     }
     catch (Exception e)
     {
         return(null);
     }
 }
 public List <ActionParameter> ActionParams()
 {
     try
     {
         iotSharedEntityContext <ActionParameter> propCont = new iotSharedEntityContext <ActionParameter>();
         List <ActionParameter> stored = propCont.GetAll().ToList();
         if (stored != null)
         {
             return(stored);
         }
         return(null);
     }
     catch (Exception e)
     {
         nlogger.ErrorException(e.Message, e);
         return(new List <ActionParameter>());
     }
 }
 public List <DeviceProperty> DeviceProperties()
 {
     try
     {
         iotSharedEntityContext <DeviceProperty> propCont = new iotSharedEntityContext <DeviceProperty>();
         List <DeviceProperty> stored = propCont.GetAll().ToList();
         if (stored != null)
         {
             return(stored);
         }
         return(null);
     }
     catch (Exception e)
     {
         nlogger.ErrorException(e.Message, e);
         return(new List <DeviceProperty>());
     }
 }