diff options
| author | transtrike <transtrike@gmail.com> | 2021-04-07 18:41:30 +0300 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2021-04-07 18:41:30 +0300 |
| commit | b8d1edfc582bee2ef648757bcad1bbadd075bb08 (patch) | |
| tree | 0042a44c3091af36994cdc9b91a835ed1d803eaa /src/Data/DevHive.Data/Repositories/RatingRepository.cs | |
| parent | f4eac9c89bef0c21d7ccb29cb0841fa621c79f46 (diff) | |
| parent | da7d6223c261aac8e8f18458c11fb48cf9ca4cfe (diff) | |
| download | DevHive-b8d1edfc582bee2ef648757bcad1bbadd075bb08.tar DevHive-b8d1edfc582bee2ef648757bcad1bbadd075bb08.tar.gz DevHive-b8d1edfc582bee2ef648757bcad1bbadd075bb08.zip | |
Merged from dev
Diffstat (limited to 'src/Data/DevHive.Data/Repositories/RatingRepository.cs')
| -rw-r--r-- | src/Data/DevHive.Data/Repositories/RatingRepository.cs | 10 |
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) { |
