This commit is contained in:
2022-01-27 01:12:17 +01:00
parent 27b07633be
commit 79e9b01c6a
3 changed files with 11 additions and 2 deletions
+2
View File
@@ -9,6 +9,8 @@ public class RavenOptions
public string Database { get; set; }
public bool DatabaseIsDefault { get; set; } = false;
public string CollectionPrefix { get; set; } = String.Empty;
public RavenIndexesOptions Indexes { get; set; } = new();
@@ -30,6 +30,7 @@ internal class ZeroPersistenceModule : ZeroModule
IZeroDocumentStore store = new ZeroDocumentStore(options)
{
Database = ravenOptions.DatabaseIsDefault ? ravenOptions.Database : null,
Urls = new string[1] { ravenOptions.Url },
Conventions =
{
+8 -2
View File
@@ -15,13 +15,14 @@ public abstract class EntityStore<T> : IEntityStore<T> where T : ZeroIdEntity, I
/// <inheritdoc />
public StoreConfig Config => Operations.Config;
/// <inheritdoc />
public IStoreOperations Operations { get; private set; }
protected IZeroContext Context { get; private set; }
protected IInterceptors Interceptors { get; private set; }
protected IStoreOperations Operations { get; private set; }
protected IZeroOptions Options { get; private set; }
@@ -107,6 +108,11 @@ public interface IEntityStore<T> where T : ZeroIdEntity, ISupportsFlavors, ISupp
/// </summary>
StoreConfig Config { get; }
/// <summary>
/// Access to underlying operations helper
/// </summary>
IStoreOperations Operations { get; }
/// <summary>
/// Get new instance of an entity (with an optional flavor)
/// </summary>