Exemplo n.º 1
0
 public TechniqueController(
     ITechniqueRepository _Technique
     , IUserRepository _user
     )
 {
     TechniqueRepository = _Technique;
     userRepository      = _user;
 }
Exemplo n.º 2
0
 public GalleryController(IGalleryRepository galleryRepo, ITechniqueRepository techniqueRepo, UserManager <User> userManager,
                          IEmailConfiguration emailConfiguration, IEmailService emailService, ITextAssetsRepository textRepository)
 {
     _galleryRepo        = galleryRepo;
     _techniqueRepo      = techniqueRepo;
     _emailConfiguration = emailConfiguration;
     _emailService       = emailService;
     _textRepository     = textRepository;
     _userManager        = userManager;
 }
Exemplo n.º 3
0
 public GalleryEditorController(IOptions <StorageSettings> storageSettings, IGalleryRepository repo,
                                ITextAssetsRepository textRepo, ITechniqueRepository techniqueRepo)
 {
     _galleryRepo     = repo;
     _techniqueRepo   = techniqueRepo;
     _storageSettings = storageSettings;
     _textRepo        = textRepo;
     _storageFacade   = new StorageFacade(storageSettings);
     _factory         = new ArtPieceFactory(_galleryRepo, _textRepo, _techniqueRepo);
 }
Exemplo n.º 4
0
        public ArtPieceCreationViewModel CreateViewModel(ArtPiece artPiece, ITextAssetsRepository textRepo,
                                                         ITechniqueRepository techniqueRepo, string languageCode, bool success)
        {
            var viewModel = new ArtPieceCreationViewModel(techniqueRepo, textRepo)
            {
                Id             = artPiece.ID,
                Name           = _textRepo.GetTranslatedValue(artPiece.Name, languageCode),
                Dimensions     = artPiece.Dimensions,
                Description    = _textRepo.GetTranslatedValue(artPiece.Description, languageCode),
                Technique      = _textRepo.GetTranslatedValue(artPiece.Technique.Name, languageCode),
                ImageUri       = artPiece.ImageUri,
                ForSale        = artPiece.ForSale,
                CreationDate   = artPiece.CreationDate,
                AdditionalInfo = _textRepo.GetTranslatedValue(artPiece.AdditionalInfo, languageCode),
                Language       = languageCode,
                SuccessFlag    = success
            };

            return(viewModel);
        }
Exemplo n.º 5
0
 public ArtPieceCreationViewModel(ITechniqueRepository repo, ITextAssetsRepository textRepository)
     : base(textRepository)
 {
     TechniqueRepository = repo;
     Language            = "pl";
 }
Exemplo n.º 6
0
 public ArtPieceFactory(IGalleryRepository galleryRepo, ITextAssetsRepository textRepo, ITechniqueRepository techniqueRepo)
 {
     _galleryRepo   = galleryRepo;
     _textRepo      = textRepo;
     _techniqueRepo = techniqueRepo;
 }