aboutsummaryrefslogtreecommitdiff
path: root/src/Data/DevHive.Data/Repositories/PostRepository.cs
diff options
context:
space:
mode:
authortranstrike <transtrike@gmail.com>2021-02-13 18:36:25 +0200
committertranstrike <transtrike@gmail.com>2021-02-13 18:36:25 +0200
commit018e9d303c38407589f06ec37a4a72dc4ce8e3b4 (patch)
tree05387c66338796a4c207c3bcbeca454329a28120 /src/Data/DevHive.Data/Repositories/PostRepository.cs
parentd9b9685204ece098df5a2425246a10bf65004b0f (diff)
downloadDevHive-018e9d303c38407589f06ec37a4a72dc4ce8e3b4.tar
DevHive-018e9d303c38407589f06ec37a4a72dc4ce8e3b4.tar.gz
DevHive-018e9d303c38407589f06ec37a4a72dc4ce8e3b4.zip
Merged New Project Structure; Fixed Kamen's Formatting Issues
Diffstat (limited to 'src/Data/DevHive.Data/Repositories/PostRepository.cs')
-rw-r--r--src/Data/DevHive.Data/Repositories/PostRepository.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Data/DevHive.Data/Repositories/PostRepository.cs b/src/Data/DevHive.Data/Repositories/PostRepository.cs
index d35c475..b6c5e37 100644
--- a/src/Data/DevHive.Data/Repositories/PostRepository.cs
+++ b/src/Data/DevHive.Data/Repositories/PostRepository.cs
@@ -9,7 +9,7 @@ using Microsoft.EntityFrameworkCore;
namespace DevHive.Data.Repositories
{
- public class PostRepository : BaseRepository<Post>, IPostRepository
+ public class PostRepository : BaseRepository<Post>, IPostRepository
{
private readonly DevHiveContext _context;
private readonly IUserRepository _userRepository;
@@ -41,8 +41,8 @@ namespace DevHive.Data.Repositories
}
/// <summary>
- /// This method returns the post that is made at exactly the given time and by the given creator
- /// </summary>
+ /// This method returns the post that is made at exactly the given time and by the given creator
+ /// </summary>
public async Task<Post> GetPostByCreatorAndTimeCreatedAsync(Guid creatorId, DateTime timeCreated)
{
return await this._context.Posts
@@ -68,12 +68,12 @@ namespace DevHive.Data.Repositories
.SetValues(newEntity);
List<PostAttachments> postAttachments = new();
- foreach(var attachment in newEntity.Attachments)
+ foreach (var attachment in newEntity.Attachments)
postAttachments.Add(attachment);
post.Attachments = postAttachments;
post.Comments.Clear();
- foreach(var comment in newEntity.Comments)
+ foreach (var comment in newEntity.Comments)
post.Comments.Add(comment);
// post.Rating.Id = ratingId;