From 751bbd3a7b20fd7379e65c25b13b262c87b16e00 Mon Sep 17 00:00:00 2001 From: James Tombleson Date: Fri, 4 Aug 2023 23:05:49 -0700 Subject: [PATCH] IAuthorTable.cs was added --- Newsbot.Collector.Domain/Interfaces/IAuthorTable.cs | 11 +++++++---- Newsbot.Collector.Domain/Interfaces/ICollector.cs | 9 --------- 2 files changed, 7 insertions(+), 13 deletions(-) delete mode 100644 Newsbot.Collector.Domain/Interfaces/ICollector.cs diff --git a/Newsbot.Collector.Domain/Interfaces/IAuthorTable.cs b/Newsbot.Collector.Domain/Interfaces/IAuthorTable.cs index 6c777a2..5071a54 100644 --- a/Newsbot.Collector.Domain/Interfaces/IAuthorTable.cs +++ b/Newsbot.Collector.Domain/Interfaces/IAuthorTable.cs @@ -4,8 +4,11 @@ namespace Newsbot.Collector.Domain.Interfaces; public interface IAuthorTable { - AuthorEntity New(AuthorEntity entity); - List ListBySourceId(Guid sourceId); - int TotalPosts(Guid id); - AuthorEntity? GetBySourceIdAndName(Guid sourceId, string name); + Task NewAsync(AuthorEntity entity); + + Task CreateIfMissingAsync(AuthorEntity entity); + Task> ListBySourceIdAsync(Guid sourceId); + Task TotalPostsAsync(Guid id); + Task GetBySourceIdAndNameAsync(Guid sourceId, string name); + Task GetById(Guid id); } \ No newline at end of file diff --git a/Newsbot.Collector.Domain/Interfaces/ICollector.cs b/Newsbot.Collector.Domain/Interfaces/ICollector.cs deleted file mode 100644 index ac2b55b..0000000 --- a/Newsbot.Collector.Domain/Interfaces/ICollector.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Newsbot.Collector.Domain.Models; - -namespace Newsbot.Collector.Domain.Interfaces; - -/// -public interface ICollector : IHangfireJob -{ - List Collect(); -} \ No newline at end of file