Exemplo n.º 1
0
 protected BaseController(IEntityRepository <TEntity, TEntityFilter> repository, IModelMapper <TEntity, TExternalModel> modelMapper, IPagingLinksFactory <TEntityFilter> pagingLinksFactory, IMemoryCache memoryCache, string cachePrefix)
 {
     _pagingLinksFactory = pagingLinksFactory ?? throw new ArgumentNullException(nameof(pagingLinksFactory));
     _memoryCache        = memoryCache ?? throw new ArgumentNullException(nameof(memoryCache));
     _cachePrefix        = cachePrefix ?? throw new ArgumentNullException(nameof(cachePrefix));
     _modelMapper        = modelMapper ?? throw new ArgumentNullException(nameof(modelMapper));
     _repository         = repository ?? throw new ArgumentNullException(nameof(repository));
 }
Exemplo n.º 2
0
 protected BaseController(IModelService <TModel, TFilter> modelService, IModelMapper <TModel, TOutputModel> modelMapper, IPagingLinksFactory <TFilter> pagingLinksFactory)
 {
     if (modelService == null)
     {
         throw new ArgumentNullException(nameof(modelService));
     }
     if (modelMapper == null)
     {
         throw new ArgumentNullException(nameof(modelMapper));
     }
     if (pagingLinksFactory == null)
     {
         throw new ArgumentNullException(nameof(pagingLinksFactory));
     }
     _modelService       = modelService;
     _modelMapper        = modelMapper;
     _pagingLinksFactory = pagingLinksFactory;
 }
Exemplo n.º 3
0
 public BooksController(IModelService <IBook, BookFilter> modelService, IModelMapper <IBook, Book> modelMapper, IPagingLinksFactory <BookFilter> pagingLinksFactory)
     : base(modelService, modelMapper, pagingLinksFactory)
 {
 }
Exemplo n.º 4
0
 public HousesController(IModelService <IHouse, HouseFilter> modelService, IModelMapper <IHouse, House> modelMapper, IPagingLinksFactory <HouseFilter> pagingLinksFactory)
     : base(modelService, modelMapper, pagingLinksFactory)
 {
 }
Exemplo n.º 5
0
 public HousesController(IEntityRepository <HouseEntity, HouseFilter> repository, IModelMapper <HouseEntity, House> modelMapper, IPagingLinksFactory <HouseFilter> pagingLinksFactory, IMemoryCache memoryCache) : base(repository, modelMapper, pagingLinksFactory, memoryCache, "Houses")
 {
 }
 public BooksController(IEntityRepository <BookEntity, BookFilter> repository, IModelMapper <BookEntity, Book> modelMapper, IPagingLinksFactory <BookFilter> pagingLinksFactory, IMemoryCache memoryCache) :
     base(repository, modelMapper, pagingLinksFactory, memoryCache, "Books")
 {
 }
 public CharactersController(IModelService <ICharacter, CharacterFilter> modelService, IModelMapper <ICharacter, Character> modelMapper, IPagingLinksFactory <CharacterFilter> pagingLinksFactory)
     : base(modelService, modelMapper, pagingLinksFactory)
 {
 }
 public CharactersController(IEntityRepository <CharacterEntity, CharacterFilter> repository, IModelMapper <CharacterEntity, Character> modelMapper, IPagingLinksFactory <CharacterFilter> pagingLinksFactory, IMemoryCache memoryCache) :
     base(repository, modelMapper, pagingLinksFactory, memoryCache, "Characters")
 {
 }