/// <summary> /// Creates a new domain context /// </summary> /// <param name="mappings">The context type and property mappings</param> ///<param name="connectionString">The connection string that will be used to connect to an existing BrightstarDB store</param> ///<param name="enableOptimisticLocking">Optional parameter to override the optimistic locking configuration specified in the connection string</param> public BrightstarEntityContext(EntityMappingStore mappings, string connectionString, bool?enableOptimisticLocking = null) : base(mappings) { var cstr = new ConnectionString(connectionString); AssertStoreFromConnectionString(cstr); _store = OpenStore(cstr, enableOptimisticLocking); _trackedObjects = new Dictionary <string, List <BrightstarEntityObject> >(); }
/// <summary> /// Creates a new domain context and connects to the store specified in the configuration connectionString. /// </summary> /// <param name="mappings">The context type and property mappings</param> public BrightstarEntityContext(EntityMappingStore mappings) : base(mappings) { var cstr = new ConnectionString(Configuration.ConnectionString); AssertStoreFromConnectionString(cstr); _store = OpenStore(cstr); _trackedObjects = new Dictionary <string, List <BrightstarEntityObject> >(); }
/// <summary> /// Creates a new domain context /// </summary> /// <param name="mappings">The context type and property mappings</param> ///<param name="connectionString">The connection string that will be used to connect to an existing BrightstarDB store</param> ///<param name="enableOptimisticLocking">Optional parameter to override the optimistic locking configuration specified in the connection string</param> /// <param name="updateGraphUri">OPTIONAL: The URI identifier of the graph to be updated with any new triples created by operations on the store. If /// not defined, the default graph in the store will be updated.</param> /// <param name="datasetGraphUris">OPTIONAL: The URI identifiers of the graphs that will be queried to retrieve entities and their properties. See /// the remarks below.</param> /// <param name="versionGraphUri">OPTIONAL: The URI identifier of the graph that contains version number statements for entities. /// If not defined, the <paramref name="updateGraphUri"/> will be used.</param> /// <remarks> /// <para>If <paramref name="datasetGraphUris"/> is null, then the context will query the graphs defined by /// <paramref name="updateGraphUri"/> and <paramref name="versionGraphUri"/> only. If all three parameters /// are null then the context will query across all graphs in the store.</para> /// </remarks> protected BrightstarEntityContext(EntityMappingStore mappings, string connectionString, bool?enableOptimisticLocking = null, string updateGraphUri = null, IEnumerable <string> datasetGraphUris = null, string versionGraphUri = null) : base(mappings) { var cstr = new ConnectionString(connectionString); AssertStoreFromConnectionString(cstr); _store = OpenStore(cstr, enableOptimisticLocking, updateGraphUri, datasetGraphUris, versionGraphUri); _trackedObjects = new Dictionary <string, List <BrightstarEntityObject> >(); }
public void SetUp() { var storeName = "BasicDataObjectTests_" + DateTime.Now.Ticks; if (_isPersistent) { var client = BrightstarService.GetClient(_connectionString); if (client.DoesStoreExist(storeName)) { client.DeleteStore(storeName); Thread.Sleep(500); } client.CreateStore(storeName); } _context = BrightstarService.GetDataObjectContext(_connectionString); _store = _context.OpenStore(storeName, NamespaceMappings); }
public void SetUp() { var storeName = "BasicDataObjectTests_" + DateTime.Now.Ticks; var connectionString = new ConnectionString(String.Format(_connectionString, Path.GetFullPath(Configuration.DataLocation), Path.GetFullPath(Configuration.StoreLocation), storeName)); if (_isPersistent) { var client = BrightstarService.GetClient(connectionString); if (client.DoesStoreExist(connectionString.StoreName)) { client.DeleteStore(connectionString.StoreName); Thread.Sleep(500); } client.CreateStore(connectionString.StoreName); } _context = BrightstarService.GetDataObjectContext(connectionString); _store = _context.OpenStore(connectionString.StoreName, NamespaceMappings); }
/// <summary> /// Initialize a new entity context using the specified Brightstar /// Data Object Store connection /// </summary> /// <param name="dataObjectStore">The connection to the Brightstar Data Object Store that will provide the entity objects</param> public MyEntityContext(IDataObjectStore dataObjectStore) : base(TypeMappings, dataObjectStore) { InitializeContext(); }
/// <summary> /// Initialize a new entity context using the specified Brightstar /// Data Object Store connection /// </summary> /// <param name="dataObjectStore">The connection to the Brightstar Data Object Store that will provide the entity objects</param> public EventFeedContext(IDataObjectStore dataObjectStore) : base(TypeMappings, dataObjectStore) { InitializeContext(); }
/// <summary> /// Initialize a new entity context using the specified Brightstar /// Data Object Store connection /// </summary> /// <param name="dataObjectStore">The connection to the Brightstar Data Object Store that will provide the entity objects</param> public TweetBoxContext(IDataObjectStore dataObjectStore) : base(TypeMappings, dataObjectStore) { InitializeContext(); }
/// <summary> /// Initialize a new entity context using the specified Brightstar /// Data Object Store connection /// </summary> /// <param name="dataObjectStore">The connection to the Brightstar Data Object Store that will provide the entity objects</param> public NerdDinnerContext(IDataObjectStore dataObjectStore) : base(TypeMappings, dataObjectStore) { InitializeContext(); }
internal SparqlResultDataObjectHelper(IDataObjectStore storeContext) { _storeContext = storeContext; }
/// <summary> /// Initialize a new entity context using the specified BrightstarDB /// Data Object Store connection /// </summary> /// <param name="dataObjectStore">The connection to the BrightstarDB Data Object Store that will provide the entity objects</param> public semanticLexiconContext(IDataObjectStore dataObjectStore) : base(dataObjectStore) { InitializeContext(); }
/// <summary> /// Initialize a new entity context using the specified BrightstarDB /// Data Object Store connection /// </summary> /// <param name="dataObjectStore">The connection to the BrightstarDB Data Object Store that will provide the entity objects</param> public MyEntityContext(IDataObjectStore dataObjectStore) : base(dataObjectStore) { InitializeContext(); }
/// <summary> /// Initialize a new entity context using the specified Brightstar /// Data Object Store connection /// </summary> /// <param name="dataObjectStore">The connection to the Brightstar Data Object Store that will provide the entity objects</param> public NotesContext(IDataObjectStore dataObjectStore) : base(TypeMappings, dataObjectStore) { InitializeContext(); }
/// <summary> /// Initialize a new entity context using the specified BrightstarDB /// Data Object Store connection /// </summary> /// <param name="dataObjectStore">The connection to the BrightstarDB Data Object Store that will provide the entity objects</param> /// <param name="typeMappings">OPTIONAL: A <see cref="EntityMappingStore"/> that overrides the default mappings generated by reflection.</param> public MyEntityContext(IDataObjectStore dataObjectStore, EntityMappingStore typeMappings = null) : base(typeMappings ?? TypeMappings, dataObjectStore) { InitializeContext(); }
/// <summary> /// Creates a new domain context /// </summary> /// <param name="mappings">The context type and property mappings</param> /// <param name="store">The Brightstar store that manages the data</param> protected BrightstarEntityContext(EntityMappingStore mappings, IDataObjectStore store) : base(mappings) { _store = store; _trackedObjects = new Dictionary <string, List <BrightstarEntityObject> >(); }
/// <summary> /// Initialises a new store with the specified underlying /// </summary> /// <param name="store"></param> public DynamicStore(IDataObjectStore store) { _store = store; }
/// <summary> /// Initialize a new entity context using the specified Brightstar /// Data Object Store connection /// </summary> /// <param name="dataObjectStore">The connection to the Brightstar Data Object Store that will provide the entity objects</param> public AccountsContext(IDataObjectStore dataObjectStore) : base(TypeMappings, dataObjectStore) { InitializeContext(); }
/// <summary> /// Initialize a new entity context using the specified BrightstarDB /// Data Object Store connection /// </summary> /// <param name="dataObjectStore">The connection to the BrightstarDB Data Object Store that will provide the entity objects</param> public TweetBoxContext(IDataObjectStore dataObjectStore) : base(dataObjectStore) { InitializeContext(); }
/// <summary> /// Initialize a new entity context using the specified BrightstarDB /// Data Object Store connection /// </summary> /// <param name="dataObjectStore">The connection to the BrightstarDB Data Object Store that will provide the entity objects</param> public NotesContext(IDataObjectStore dataObjectStore) : base(dataObjectStore) { InitializeContext(); }
/// <summary> /// Initialize a new entity context using the specified BrightstarDB /// Data Object Store connection /// </summary> /// <param name="dataObjectStore">The connection to the BrightstarDB Data Object Store that will provide the entity objects</param> public NerdDinnerContext(IDataObjectStore dataObjectStore) : base(dataObjectStore) { InitializeContext(); }