Newsbot.Collector/Newsbot.Collector.Domain/Interfaces/IAuthorTable.cs

14 lines
470 B
C#

using Newsbot.Collector.Domain.Entities;
namespace Newsbot.Collector.Domain.Interfaces;
public interface IAuthorTable
{
Task<AuthorEntity> NewAsync(AuthorEntity entity);
Task<AuthorEntity> CreateIfMissingAsync(AuthorEntity entity);
Task<List<AuthorEntity>> ListBySourceIdAsync(Guid sourceId);
Task<int> TotalPostsAsync(Guid id);
Task<AuthorEntity?> GetBySourceIdAndNameAsync(Guid sourceId, string name);
Task<AuthorEntity?> GetById(Guid id);
}