Пример #1
0
 /// <summary>
 /// Delete an estate object.
 /// </summary>
 /// <param name="key">Key of object to delete.</param>
 /// <returns>True if object was successfully deleted.</returns>
 public static bool DeleteObject(int key)
 {
     if (DealCache.ContainsKey(key))
     {
         return false;
     }
     OrderCache.Query (new SqlFieldsQuery
         ($"delete from Orders where ObjectID={key};"));
     BookmarkCache.Query (new SqlFieldsQuery
         ($"delete from Bookmarks where ObjectID={key};"));
     MatchCache.Query (new SqlFieldsQuery
         ($"delete from Matches where ObjectID={key};"));
     ObjectCache.Remove(key);
     return true;
 }