public bool AddFirmware(string key, string SwPkgVersion, string SwPkgDescription, int SwColorStandardID, string SwFileChecksum, string SwFileChecksumType, string SwCreatedBy, string SwManufacturer, string SwDeviceType, List <string> SupportedModels, string BlobDescription)
        {
            PackageFile package = FirmwareCache.AddOrGetFirmware(key, new PackageFile()) as PackageFile;

            return(_dataOperations.AddSoftwarePackage(package?.SoftwarePakage, package?.HelpDocument, SwPkgVersion, SwPkgDescription, SwColorStandardID, package?.SoftwarePackageFileName, "bin", package.SoftwarePakage.LongLength, null, SwFileChecksum, SwFileChecksumType, SwCreatedBy, "Honeywell", "Camera", SupportedModels, BlobDescription,
                                                      package?.HelpDocumentFileName, "pdf", package?.HelpDocument?.Length));
        }
        public Guid UploadFirmware(byte[] firmwareSwPackg, string firmwareFilename, byte[] helpDoc, string helpDocFileName, string key)
        {
            PackageFile packageFile = new PackageFile();

            packageFile.HelpDocument            = helpDoc;
            packageFile.HelpDocumentFileName    = helpDocFileName;
            packageFile.SoftwarePakage          = firmwareSwPackg;
            packageFile.SoftwarePackageFileName = firmwareFilename;

            if (Guid.Empty != new Guid(key))
            {
                FirmwareCache.DeleteFromMemoryCache(key);
            }

            var tempKey = Guid.NewGuid();

            FirmwareCache.AddOrGetFirmware(tempKey.ToString(), packageFile);
            return(tempKey);
        }
        public static object AddOrGetFirmware(string key, PackageFile packageFile)
        {
            object fw = MemoryCache.Default.AddOrGetExisting(key, packageFile, DateTime.Now.AddMinutes(30));

            return(fw);
        }