mirror of
https://github.com/streetwriters/notesnook-sync-server.git
synced 2026-07-11 05:03:40 +02:00
open source Notesnook API
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
|
||||
using MongoDB.Driver;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Streetwriters.Data.Interfaces
|
||||
{
|
||||
public interface IDbContext : IDisposable
|
||||
{
|
||||
void AddCommand(Func<IClientSessionHandle, CancellationToken, Task> func);
|
||||
Task<int> SaveChanges();
|
||||
IMongoCollection<T> GetCollection<T>(string databaseName, string collectionName);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Streetwriters.Data.Interfaces
|
||||
{
|
||||
public interface IDbSettings
|
||||
{
|
||||
string DatabaseName { get; set; }
|
||||
string ConnectionString { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Streetwriters.Data.Interfaces
|
||||
{
|
||||
public interface IUnitOfWork : IDisposable
|
||||
{
|
||||
Task<bool> Commit();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user