Archived
1
0
Fork 0
forked from Moux23333/FreeSR
This repository has been archived on 2024-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
FreeSR/FreeSR.Database/ISRDatabase.cs
2024-01-27 21:06:07 +08:00

18 lines
619 B
C#

namespace FreeSR.Database
{
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
public interface ISRDatabase<T> where T : class
{
Task Insert(T document);
Task InsertMany(IEnumerable<T> documents);
Task<List<T>> Find(Expression<Func<T, bool>> filter);
Task<T> FindOne(Expression<Func<T, bool>> filter);
Task Update(Expression<Func<T, bool>> filter, T updatedDocument);
Task Delete(Expression<Func<T, bool>> filter);
Task<long> Count();
Task<T> FindMax(Expression<Func<T, object>> fieldSelector);
}
}