- Create new project in Visual Studio. The project type needs to be a .Net Windows Desktop App application or library
- Add reference -> Assemblies -> Extensions -> Semata.DataStore
-
Add reference -> Assemblies -> Extensions -> Semata.DataStore.Util
This provides extensions that provide extensions to make it easier to use DataStore from .Net
- Using the Designer create a new DataStore.
- Add reference -> Assemblies -> Extensions -> Semata.DataStore.ObjectModel
- Ensure the DataStore has a name.
-
Create a text template and replace any existing code with this:
<#@ template debug="true" hostspecific="true" language="C#" #> <#@ output extension=".cs" #> <#@ DataStoreCodeGenerator Processor="Semata.CodeGeneratorDirectiveProcessor" #> <# GenerateObjectModel(<DataStore file>, <namespace>); #>
where:
- <DataStore file> is the path of the DataStore relative to the project folder. If it is in the folder, this can just be its name.
- <namespace> is the namespace the generated code will be placed in.
- Add reference -> Assemblies -> Extensions -> Semata.Lazy
- Add reference -> Assemblies -> Extensions -> Semata.EditableData
- Add reference -> Assemblies -> Extensions -> Semata.DataStore.ObjectModel.Views
-
Create a text template and replace any existing code with this:
<#@ template debug="false" hostspecific="true" language="C#" #> <#@ output extension=".cs" #> <#@ DataStoreCodeGenerator Processor="Semata.CodeGeneratorDirectiveProcessor" #> <# GenerateObjectModelViews(<DataStore file>, <object model namespace>, <namespace>); #>
where:
- <DataStore file> is the path of the DataStore relative to the project folder. If it is in the folder, this can just be its name.
- <object model namespace> is the namespace that was used for object model generation.
- <namespace> is the namespace the generated code will be placed in.
See: