public static DTO_ApplicationSettings Settings(long TagID, int AppID)
 {
     using (var exodusDB = new exodusEntities())
     {
         var rez = exodusDB.stp_App_Settings_Read(TagID, AppID).FirstOrDefault();
         if (rez != null)
         {
             var appSettings = new DTO_ApplicationSettings()
             {
                 SettingsID    = rez.SettingID,
                 ApplicationID = rez.fk_AppID,
                 TagID         = rez.fk_TagID
             };
             //
             appSettings.ReadFromXml(rez.Settings);
             return(appSettings);
         }
         //
         return(new DTO_ApplicationSettings());
     }
 }