open source Notesnook API

This commit is contained in:
Abdullah Atta
2022-12-28 16:20:25 +05:00
parent cf406454cd
commit d2217adce7
85 changed files with 4137 additions and 0 deletions
@@ -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();
}
}