18 lines
585 B
C#
18 lines
585 B
C#
using MongoDB.Driver;
|
|
|
|
namespace Application.Services.Database.MongoDB;
|
|
|
|
public interface IMedicalHistoryMongoDbService
|
|
{
|
|
IMongoCollection<T> GetCollection<T>();
|
|
|
|
Task<List<T>> FindAsync<T>(List<(string FieldName, string Value)> criteria, CancellationToken token);
|
|
|
|
Task AddAsync<T>(T document, CancellationToken token);
|
|
|
|
Task ModifyAsync<T>(string keyField, string keyValue, T document, CancellationToken token);
|
|
|
|
Task DeleteAsync<T>(string keyField, string keyValue, CancellationToken token);
|
|
|
|
Task DeleteByIdAsync<T>(string id, CancellationToken token);
|
|
} |