From 62c7fd56e5aeae208974ed4c937ce59453d4f662 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Thu, 7 Feb 2019 16:43:27 +0300 Subject: [PATCH] Delete MongoPostTagRepository.cs --- .../Blogging/Posts/MongoPostTagRepository.cs | 30 ------------------- 1 file changed, 30 deletions(-) delete mode 100644 modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Posts/MongoPostTagRepository.cs diff --git a/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Posts/MongoPostTagRepository.cs b/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Posts/MongoPostTagRepository.cs deleted file mode 100644 index edd3ad4bae..0000000000 --- a/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Posts/MongoPostTagRepository.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Threading.Tasks; -using MongoDB.Driver.Linq; -using Volo.Abp.Domain.Repositories.MongoDB; -using Volo.Abp.MongoDB; -using Volo.Blogging.MongoDB; - -namespace Volo.Blogging.Posts -{ - public class MongoPostTagRepository : MongoDbRepository, IPostTagRepository - { - public MongoPostTagRepository(IMongoDbContextProvider dbContextProvider) : base(dbContextProvider) - { - } - - public void DeleteOfPost(Guid id) - { - var recordsToDelete = GetMongoQueryable().Where(pt => pt.PostId == id); - foreach (var record in recordsToDelete) - { - Delete(record); - } - } - - public async Task FindByTagIdAndPostIdAsync(Guid postId, Guid tagId) - { - return await GetMongoQueryable().FirstOrDefaultAsync(pt => pt.PostId == postId && pt.TagId == tagId); - } - } -}