Пример #1
0
 public AdvertProvider(IAdvertRepository advertRepository)
 {
     if (advertRepository != null)
     {
         _advertRepository = advertRepository;
     }
     else
     {
         RepositoriesFactory factory = new RepositoriesFactory();
         _advertRepository = factory.GetAdvertRepository();
     }
 }
Пример #2
0
 public AdvertProvider GetAdvertProvider()
 {
     return(new AdvertProvider(_repositoriesFactory.GetAdvertRepository()));
 }