Esempio n. 1
0
 public static void Upsert(SignStorageObject storageObject)
 {
     Task.Run(() => DeleteExpiredAsync());
     using (var db = GetDatabase())
     {
         var storageObjects = db.GetCollection <SignStorageObject>("signSupportStorage");
         storageObjects.Upsert(storageObject);
     }
 }
        public static SignStorageObject Find(string id)
        {
            if (string.IsNullOrEmpty(id))
            {
                throw GetException("Empty id cannot be found in demo-database");
            }
            SignStorageObject StorageObject = SignSupportDatabase.FindById(id);

            if (StorageObject != null)
            {
                return(StorageObject);
            }
            throw GetException("Sign request with id " + id + " not found in demo-database");
        }