aboutsummaryrefslogtreecommitdiff
path: root/src/Data/DevHive.Data
diff options
context:
space:
mode:
authortranstrike <transtrike@gmail.com>2021-04-05 13:41:31 +0300
committertranstrike <transtrike@gmail.com>2021-04-05 13:41:31 +0300
commitda7d6223c261aac8e8f18458c11fb48cf9ca4cfe (patch)
treea8b29422156a7fe76a2034142744f22e328b8c2f /src/Data/DevHive.Data
parentbad7456b379bcc683431e2279591f7c5227bd55a (diff)
downloadDevHive-da7d6223c261aac8e8f18458c11fb48cf9ca4cfe.tar
DevHive-da7d6223c261aac8e8f18458c11fb48cf9ca4cfe.tar.gz
DevHive-da7d6223c261aac8e8f18458c11fb48cf9ca4cfe.zip
Introduced consts for every string possible. FML
Diffstat (limited to 'src/Data/DevHive.Data')
-rw-r--r--src/Data/DevHive.Data/Repositories/RatingRepository.cs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/Data/DevHive.Data/Repositories/RatingRepository.cs b/src/Data/DevHive.Data/Repositories/RatingRepository.cs
index c35f6d5..2048c3f 100644
--- a/src/Data/DevHive.Data/Repositories/RatingRepository.cs
+++ b/src/Data/DevHive.Data/Repositories/RatingRepository.cs
@@ -11,13 +11,11 @@ namespace DevHive.Data.Repositories
public class RatingRepository : BaseRepository<Rating>, IRatingRepository
{
private readonly DevHiveContext _context;
- private readonly IPostRepository _postRepository;
- public RatingRepository(DevHiveContext context, IPostRepository postRepository)
+ public RatingRepository(DevHiveContext context)
: base(context)
{
this._context = context;
- this._postRepository = postRepository;
}
public override async Task<Rating> GetByIdAsync(Guid id)
@@ -28,7 +26,7 @@ namespace DevHive.Data.Repositories
.FirstOrDefaultAsync(x => x.Id == id);
}
/// <summary>
- /// Gets all the ratings for a psot.
+ /// Gets all the ratings for a post.
/// </summary>
/// <param name="postId">Id of the post.</param>
/// <returns></returns>
@@ -40,10 +38,10 @@ namespace DevHive.Data.Repositories
.Where(x => x.Post.Id == postId).ToListAsync();
}
/// <summary>
- /// Checks if a user rated a given post. In DevHive every user has one or no rating for every post.
+ /// Checks if a user rated a given post. In DevHive every user has one or no rating for every post.
/// </summary>
/// <param name="userId">Id of the user.</param>
- /// <param name="postId">Id of the psot.</param>
+ /// <param name="postId">Id of the post.</param>
/// <returns>True if the user has already rated the post and false if he hasn't.</returns>
public async Task<bool> UserRatedPost(Guid userId, Guid postId)
{