40 lines
1007 B
C#
40 lines
1007 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using ViraScraper.Models;
|
|
using ViraScraper.Repositories.Contracts;
|
|
|
|
namespace ViraScraper.Repositories
|
|
{
|
|
public class RepositoryWrapper : IRepositoryWrapper
|
|
{
|
|
protected readonly ScrapDbContext _context;
|
|
private IHashtagRepository hashtag;
|
|
private ISynonymsRepository synonyms;
|
|
public RepositoryWrapper(ScrapDbContext context)
|
|
{
|
|
_context = context;
|
|
}
|
|
public IHashtagRepository Hashtag
|
|
{
|
|
get
|
|
{
|
|
if(hashtag==null)
|
|
hashtag = new HashtagRepository(_context);
|
|
return hashtag;
|
|
}
|
|
}
|
|
|
|
public ISynonymsRepository Synonyms
|
|
{
|
|
get
|
|
{
|
|
if (synonyms == null)
|
|
synonyms = new SynonymsRepository(_context);
|
|
return synonyms;
|
|
}
|
|
}
|
|
}
|
|
}
|