aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Data/Repositories/CommentRepository.cs
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2021-01-28 20:20:41 +0200
committerSyndamia <kamen.d.mladenov@protonmail.com>2021-01-28 20:20:41 +0200
commit702e947c20cbdc2c5aaacfa0e8172bfc97912dd2 (patch)
tree4b2569ff82383658cd3e8dc3c8fa91c8785337a0 /src/DevHive.Data/Repositories/CommentRepository.cs
parent9fd19d0c584fb07107319d07c9a5b571a4ab47dd (diff)
downloadDevHive-702e947c20cbdc2c5aaacfa0e8172bfc97912dd2.tar
DevHive-702e947c20cbdc2c5aaacfa0e8172bfc97912dd2.tar.gz
DevHive-702e947c20cbdc2c5aaacfa0e8172bfc97912dd2.zip
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
Diffstat (limited to 'src/DevHive.Data/Repositories/CommentRepository.cs')
-rw-r--r--src/DevHive.Data/Repositories/CommentRepository.cs2
1 files changed, 1 insertions, 1 deletions
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<Comment> 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