Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>All of the above are good answers, and generally solve the problem.</p> <p>If you need an easy, free way to scale to millions of pieces of data, try out the ESENT Managed Interface project on <a href="http://managedesent.codeplex.com/" rel="noreferrer">CodePlex</a>.</p> <blockquote> <p>ESENT is an embeddable database storage engine (ISAM) which is part of Windows. It provides reliable, transacted, concurrent, high-performance data storage with row-level locking, write-ahead logging and snapshot isolation. This is a managed wrapper for the ESENT Win32 API.</p> </blockquote> <p>It has a PersistentDictionary object that is quite easy to use. Think of it as a Dictionary() object, but it is automatically loaded from and saved to disk without extra code.</p> <p>For example:</p> <pre><code>/// &lt;summary&gt; /// Ask the user for their first name and see if we remember /// their last name. /// &lt;/summary&gt; public static void Main() { PersistentDictionary&lt;string, string&gt; dictionary = new PersistentDictionary&lt;string, string&gt;("Names"); Console.WriteLine("What is your first name?"); string firstName = Console.ReadLine(); if (dictionary.ContainsKey(firstName)) { Console.WriteLine("Welcome back {0} {1}", firstName, dictionary[firstName]); } else { Console.WriteLine("I don't know you, {0}. What is your last name?", firstName); dictionary[firstName] = Console.ReadLine(); } </code></pre> <p>To answer George's question:</p> <blockquote> <p><strong>Supported Key Types</strong></p> <p>Only these types are supported as dictionary keys:</p> <p>Boolean Byte Int16 UInt16 Int32 UInt32 Int64 UInt64 Float Double Guid DateTime TimeSpan String </p> <p><strong>Supported Value Types</strong></p> <p>Dictionary values can be any of the key types, Nullable versions of the key types, Uri, IPAddress or a serializable structure. A structure is only considered serializable if it meets all these criteria:</p> <p>• The structure is marked as serializable • Every member of the struct is either: 1. A primitive data type (e.g. Int32) 2. A String, Uri or IPAddress 3. A serializable structure.</p> <p>Or, to put it another way, a serializable structure cannot contain any references to a class object. This is done to preserve API consistency. Adding an object to a PersistentDictionary creates a copy of the object though serialization. Modifying the original object will not modify the copy, which would lead to confusing behavior. To avoid those problems the PersistentDictionary will only accept value types as values.</p> <p><strong>Can Be Serialized</strong> [Serializable] struct Good { public DateTime? Received; public string Name; public Decimal Price; public Uri Url; } </p> <p><strong>Can’t Be Serialized</strong> [Serializable] struct Bad { public byte[] Data; // arrays aren’t supported public Exception Error; // reference object }</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload