From 702e947c20cbdc2c5aaacfa0e8172bfc97912dd2 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 28 Jan 2021 20:20:41 +0200 Subject: Updated comments and posts to use Creator.Id, rather than CreatorId; updated service to give Posts and Comments the post and creator objects from db --- src/DevHive.Data/Repositories/CommentRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/DevHive.Data/Repositories/CommentRepository.cs') diff --git a/src/DevHive.Data/Repositories/CommentRepository.cs b/src/DevHive.Data/Repositories/CommentRepository.cs index 006326a..d33b7bf 100644 --- a/src/DevHive.Data/Repositories/CommentRepository.cs +++ b/src/DevHive.Data/Repositories/CommentRepository.cs @@ -20,7 +20,7 @@ namespace DevHive.Data.Repositories public async Task GetCommentByIssuerAndTimeCreatedAsync(Guid issuerId, DateTime timeCreated) { return await this._context.Comments - .FirstOrDefaultAsync(p => p.CreatorId == issuerId && + .FirstOrDefaultAsync(p => p.Creator.Id == issuerId && p.TimeCreated == timeCreated); } #endregion -- cgit v1.2.3