public void StoreScreenshot(Screenshot screenshot)
 {
     using (var context = new AppCampusContext())
     {
         context.Screenshots.Add(
             new ScreenshotTable()
             {
                 Id = screenshot.Id,
                 DeviceId = screenshot.DeviceId,
                 CreatedDate = DateTime.UtcNow,
                 Base64ImageString = screenshot.Base64ImageString
             });
         context.SaveChanges();
     }
 }
 public Guid AddImage(string base64Image, string imageName) 
 {
     using (var context = new AppCampusContext())
     {
         ImageTable imageTable = context.Images.Add(
             new ImageTable() 
             {
                 Id = CombIdentityFactory.GenerateIdentity(),
                 Base64Image = base64Image,
                 CreatedDate = DateTime.Now,
                 Name = imageName
             });
         context.SaveChanges();
         return imageTable.Id;
     }
 }
        public Guid SaveFile(byte[] file)
        {
            var logFile = new LogFileTable()
            {
                Id = CombIdentityFactory.GenerateIdentity(),
                Binary = file
            };

            using (var context = new AppCampusContext())
            {
                context.LogFiles.Add(logFile);

                context.SaveChanges();
            }

            return logFile.Id;
        }
        public Guid SaveFile(string fileName, byte[] file)
        {
            var softwareFile = new SoftwareFileTable()
            {
                Id = CombIdentityFactory.GenerateIdentity(),
                FileName = fileName,
                Binary = file
            };

            using (var context = new AppCampusContext())
            {
                context.SoftwareFiles.Add(softwareFile);

                context.SaveChanges();
            }

            return softwareFile.Id;
        }