freetubesync/FreeTubeSync/IRepository.cs
Mario Steele 4985dc4179 Started the Split
Split Json data models coming from REST Api, from the Database models
storing them in a SQLite database.
Work to re-engineer endpoints to use Database objects, and copy/update
data from the json objects.
More work is needed.
2025-07-22 17:03:33 -05:00

10 lines
No EOL
451 B
C#

namespace FreeTubeSync;
public interface IRepository<TEntity> where TEntity : class
{
Task AddAsync(TEntity entity, CancellationToken ct, bool sync = true);
Task UpdateAsync(TEntity entity, CancellationToken ct, bool sync = true);
Task DeleteAsync(TEntity entity, CancellationToken ct, bool sync = true);
Task<TEntity?> GetByIdAsync(string id, CancellationToken ct);
Task<IEnumerable<TEntity>> GetAllAsync(CancellationToken ct);
}