Getting Started (Windows Runtime)

  • Create new project in Visual Studio. The project type needs to be a Store App.
  • Add reference -> Windows Phone 8.1 -> Extensions -> Semata.DataStore
  • Using the Designer create a new DataStore in the project folder
  • Add the DataStore file to project
  • Set the properties of the DataStore file in the project:
    Build Action Content
    Copy to Output Directory Copy always
If you also wish to use Object Model generation do the following:
  • Give the DataStore a name
  • Create a text template and replace any existing code with this:

    <#@ template debug="false" hostspecific="true" language="C#" #>
    <#@ output extension=".cs" #>
    <#@ GenerateSemataObjectModel Processor="GenerateSemataObjectModel"#>
    <# OutputUsingDirectives(); #>
    using System.Collections.ObjectModel;
    <# GenerateClasses("<DataStore file>", "<namespace>","<collection>"); #>


    • <DataStore file> is the path of the file relative to the project folder. If it is in the folder, this can just be its name.
    • <namespace> is the namespace of the generated code will be placed in.
    • <collection> is the name of a class that implements ICollection<T>. This would typically be ObservableCollection if you were using XAML.