SEOShareRepository.cs 585 B

12345678910111213141516171819202122232425
  1. using CZFW.MDB.Util;
  2. using MongoDB.Bson;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Text;
  6. namespace CZFW.MDB
  7. {
  8. public class SEOShareRepository : ISEOShare
  9. {
  10. IMongoRepository repository;
  11. public SEOShareRepository(IMongoRepository repo)
  12. {
  13. repository = repo;
  14. }
  15. public BsonDocument GetSEOShare(string path)
  16. {
  17. repository.SetCurrentTable(Constants.SEOSHARE_TABLE_NAME);
  18. var res = repository.GetOne($"{{url:'{path.Trim()}'}}");
  19. return res;
  20. }
  21. }
  22. }