16 lines
472 B
C#
16 lines
472 B
C#
using Marten;
|
|
|
|
namespace Netina.Infrastructure.Marten;
|
|
|
|
public class MartenRepositoryWrapper : IMartenRepositoryWrapper
|
|
{
|
|
private readonly IDocumentStore _documentStore;
|
|
|
|
public MartenRepositoryWrapper(IDocumentStore documentStore)
|
|
{
|
|
_documentStore = documentStore;
|
|
}
|
|
|
|
public IMartenRepository<TMartenEntity> SetRepository<TMartenEntity>() where TMartenEntity : IMartenEntity
|
|
=> new MartenRepository<TMartenEntity>(_documentStore);
|
|
} |