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/PostRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/DevHive.Data/Repositories/PostRepository.cs') diff --git a/src/DevHive.Data/Repositories/PostRepository.cs b/src/DevHive.Data/Repositories/PostRepository.cs index e8180de..67988f2 100644 --- a/src/DevHive.Data/Repositories/PostRepository.cs +++ b/src/DevHive.Data/Repositories/PostRepository.cs @@ -27,7 +27,7 @@ namespace DevHive.Data.Repositories public async Task GetPostByCreatorAndTimeCreatedAsync(Guid creatorId, DateTime timeCreated) { return await this._context.Posts - .FirstOrDefaultAsync(p => p.CreatorId == creatorId && + .FirstOrDefaultAsync(p => p.Creator.Id == creatorId && p.TimeCreated == timeCreated); } #endregion -- cgit v1.2.3