public RecipeDisplayViewModelMapper(
     IStyleRepository styleRepository
     ,IUserProfileEntityFactory userProfileFactory)
 {
     this._styleRepository = styleRepository;
     this._userProfileFactory = userProfileFactory;
 }
Esempio n. 2
0
 public RecipeDisplayViewModelMapper(
     IStyleRepository styleRepository
     , IUserProfileEntityFactory userProfileFactory)
 {
     this._styleRepository    = styleRepository;
     this._userProfileFactory = userProfileFactory;
 }
Esempio n. 3
0
 public CollectionRepository(IConfiguration configuration, IAlbumRepository albumRepo, IGenreRepository genreRepo, IStyleRepository styleRepo)
 {
     _connectionString = configuration.GetValue <string>("ConnectionString");
     _albumRepo        = albumRepo;
     _genreRepo        = genreRepo;
     _styleRepo        = styleRepo;
 }
Esempio n. 4
0
        public BeerOrchestrator(IBeerRepository beerRepository, IBreweryRepository breweryRepository, ITapRepository tapRepository, IKegRepository kegRepository, IStyleRepository styleRepository)
        {
            if (beerRepository == null)
            {
                throw new ArgumentNullException("beerRepository");
            }
            if (breweryRepository == null)
            {
                throw new ArgumentNullException("breweryRepository");
            }
            if (tapRepository == null)
            {
                throw new ArgumentNullException("tapRepository");
            }
            if (kegRepository == null)
            {
                throw new ArgumentNullException("kegRepository");
            }
            if (null == styleRepository)
            {
                throw new ArgumentException("styleRepository");
            }

            _beerRepository    = beerRepository;
            _breweryRepository = breweryRepository;
            _tapRepository     = tapRepository;
            _kegRepository     = kegRepository;
            _styleRepository   = styleRepository;
        }
Esempio n. 5
0
 public TitresController(ITitreRepository titreRepository, IStyleRepository styleRepository, IArtisteRepository artisteRepository, IConfiguration configuration)
 {
     _titreRepository   = titreRepository;
     _styleRepository   = styleRepository;
     _artisteRepository = artisteRepository;
     _configuration     = configuration;
 }
Esempio n. 6
0
 public ConfigurationController(IFieldTypeRepository fieldTypeRepository, IStyleRepository styleRepository,
                                IValidationRepository validationRepository)
 {
     _fieldTypeRepository  = fieldTypeRepository;
     _styleRepository      = styleRepository;
     _validationRepository = validationRepository;
 }
Esempio n. 7
0
        public StyleOrchestrator(IStyleRepository styleRepository)
        {
            if(null == styleRepository)
                throw new ArgumentNullException("styleRepository");

            _styleRepository = styleRepository;
        }
Esempio n. 8
0
 public ArtistController(Context context)
 {
     this.artistRepository         = new ArtistRepository(context);
     this.artistmovementRepository = new ArtistMovementRepository(context);
     this.countryRepository        = new CountryRepository(context);
     this.styleRepository          = new StyleRepository(context);
     this.artworkRepository        = new ArtworkRepository(context);
 }
Esempio n. 9
0
 public StylingController(
     IStyleRepository styleRepo,
     IMenuRepository menuRepo,
     IAuthorizeService authorizeService) : base(authorizeService)
 {
     _styleRepo        = styleRepo;
     _authorizeService = authorizeService;
 }
Esempio n. 10
0
 public StyleService(
     IColorRepository colorRepository,
     ISizeRepository sizeRepository,
     IStyleRepository styleRepository)
 {
     _colorRepository = colorRepository;
     _sizeRepository  = sizeRepository;
     _styleRepository = styleRepository;
 }
Esempio n. 11
0
        public StyleOrchestrator(IStyleRepository styleRepository)
        {
            if (null == styleRepository)
            {
                throw new ArgumentNullException("styleRepository");
            }

            _styleRepository = styleRepository;
        }
 private void Dispose(bool dispose)
 {
     if (dispose)
     {
         if (_designRepository != null)
         {
             _designRepository = null;
         }
         if (_designViewRepository != null)
         {
             _designViewRepository = null;
         }
         if (_designerRepository != null)
         {
             _designerRepository = null;
         }
         if (_accountRepository != null)
         {
             _accountRepository = null;
         }
         if (_categoryRepository != null)
         {
             _categoryRepository = null;
         }
         if (_styleRepository != null)
         {
             _styleRepository = null;
         }
         if (_photoRepository != null)
         {
             _photoRepository = null;
         }
         if (_designerDesignRepository != null)
         {
             _designerDesignRepository = null;
         }
         if (_designPhotoRepository != null)
         {
             _designPhotoRepository = null;
         }
         if (_designerPhotoRepository != null)
         {
             _designerPhotoRepository = null;
         }
         if (_roleRepository != null)
         {
             _roleRepository = null;
         }
         if (_instance != null)
         {
             _instance = null;
         }
     }
 }
Esempio n. 13
0
 public StyleService(
     IColorRepository colorRepository,
     ISizeRepository sizeRepository,
     IStyleRepository styleRepository,
     IMapper mapper)
 {
     _colorRepository = colorRepository;
     _sizeRepository  = sizeRepository;
     _styleRepository = styleRepository;
     _mapper          = mapper;
 }
Esempio n. 14
0
 public RecipeController(IRecipeRepository recipeRepository,
     IStyleRepository styleRepository,
     IUserProfileEntityFactory userProfileEntityFactory,
     IRecipeDisplayViewModelMapper displayViewModelMapper,
     IRecipeEditViewModelMapper editViewModelMapper)
     : base()
 {
     this._recipeRepository = recipeRepository;
     this._styleRepository = styleRepository;
     this._userProfileEntityFactory = userProfileEntityFactory;
     this._displayViewModelMapper = displayViewModelMapper;
     this._editViewModelMapper = editViewModelMapper;
 }
Esempio n. 15
0
 public RecipeController(IRecipeRepository recipeRepository,
                         IStyleRepository styleRepository,
                         IUserProfileEntityFactory userProfileEntityFactory,
                         IRecipeDisplayViewModelMapper displayViewModelMapper,
                         IRecipeEditViewModelMapper editViewModelMapper)
     : base()
 {
     this._recipeRepository         = recipeRepository;
     this._styleRepository          = styleRepository;
     this._userProfileEntityFactory = userProfileEntityFactory;
     this._displayViewModelMapper   = displayViewModelMapper;
     this._editViewModelMapper      = editViewModelMapper;
 }
 public ArtworkController(Context context)
 {
     this.artworkRepository     = new ArtworkRepository(context);
     this.artworkTypeRepository = new ArtworkTypeRepository(context);
     this.countryRepository     = new CountryRepository(context);
     this.styleRepository       = new StyleRepository(context);
     this.materialRepository    = new MaterialRepository(context);
     this.artistRepository      = new ArtistRepository(context);
     this.museumRepository      = new MuseumRepository(context);
     this.likesRepository       = new LikesRepository(context);
     this.imageRepository       = new ImageRepository(context);
     this.collectionRepository  = new CollectionRepository(context);
 }
Esempio n. 17
0
 public ProductService(
     IProductRepository productRepository,
     IStyleRepository styleRepository,
     IReviewRepository reviewRepository,
     IProductImageRepository productImageRepository,
     IMapper mapper)
 {
     _productRepository      = productRepository;
     _styleRepository        = styleRepository;
     _reviewRepository       = reviewRepository;
     _productImageRepository = productImageRepository;
     _mapper = mapper;
 }
Esempio n. 18
0
 public ProductService(
     IProductRepository productRepository,
     IStyleRepository styleRepository,
     ICategoryRepository categoryRepository,
     IReviewRepository reviewRepository,
     IProductImageRepository productImageRepository)
 {
     _productRepository      = productRepository;
     _styleRepository        = styleRepository;
     _categoryRepository     = categoryRepository;
     _reviewRepository       = reviewRepository;
     _productImageRepository = productImageRepository;
 }
Esempio n. 19
0
        public BeerOrchestrator(IBeerRepository beerRepository, IBreweryRepository breweryRepository, ITapRepository tapRepository, IKegRepository kegRepository, IStyleRepository styleRepository)
        {
            if (beerRepository == null) throw new ArgumentNullException("beerRepository");
            if(breweryRepository == null) throw new ArgumentNullException("breweryRepository");
            if (tapRepository == null) throw new ArgumentNullException("tapRepository");
            if (kegRepository == null) throw new ArgumentNullException("kegRepository");
            if(null == styleRepository) throw new ArgumentException("styleRepository");

            _beerRepository = beerRepository;
            _breweryRepository = breweryRepository;
            _tapRepository = tapRepository;
            _kegRepository = kegRepository;
            _styleRepository = styleRepository;
        }
        public AnalyticsOrchestrator(IKegRepository kegRepository, IBeerRepository beerRepository, IStoredEventRepository storedEventRepository, ITapRepository tapRepository, IStyleRepository styleRepository)
        {
            if (null == kegRepository) throw new ArgumentNullException("kegRepository");
            if (null == beerRepository) throw new ArgumentNullException("beerRepository");
            if (null == storedEventRepository) throw new ArgumentNullException("storedEventRepository");
            if (tapRepository == null) throw new ArgumentNullException("tapRepository");
            if (styleRepository == null) throw new ArgumentNullException("styleRepository");

            _kegRepository = kegRepository;
            _beerRepository = beerRepository;
            _storedEventRepository = storedEventRepository;
            _tapRepository = tapRepository;
            _styleRepository = styleRepository;
        }
Esempio n. 21
0
 public StyleService(IStyleRepository repository) : base(repository)
 {
     songRepository = repository;
 }
Esempio n. 22
0
 public TitreController(ITitreRepository titreRepository, IStyleRepository styleRepository, IArtisteRepository artisteRepository)
 {
     _titreRepository   = titreRepository;
     _styleRepository   = styleRepository;
     _artisteRepository = artisteRepository;
 }
Esempio n. 23
0
 public StyleController(IStyleRepository styleRepository)
 {
     this._styleRepository = styleRepository;
 }
Esempio n. 24
0
 public RepositoryTestClass1(IStyleRepository styleRepository)
 {
     _StyleRepository = styleRepository;
 }
Esempio n. 25
0
 public StylesController(IStyleRepository styleRepository, IConfiguration configuration)
 {
     _styleRepository = styleRepository;
     _configuration   = configuration;
 }
Esempio n. 26
0
 public StyleController(Context context)
 {
     this.styleRepository = new StyleRepository(context);
 }
Esempio n. 27
0
 public StyleService(IStyleRepository styleRepository)
 {
     _styleRepository = styleRepository;
 }
Esempio n. 28
0
 public StylesController(IStyleRepository styleRepository)
 {
     _styleRepository = styleRepository;
 }
 public AdminController(IStyleRepository repo)
 {
     styleRepository = repo;
 }
Esempio n. 30
0
 public StyleController(IStyleRepository styleRepository, ITitreRepository titreRepository)
 {
     _styleRepository = styleRepository;
     _titreRepository = titreRepository;
 }
Esempio n. 31
0
 public StylesList(IStyleRepository styleRepository)
 {
     _styleRepository = styleRepository;
 }
Esempio n. 32
0
 public UnitOfWork(DataBaseContext context)
 {
     this.context = context;
     this.Styles  = new StyleRepository(context);
 }
 public StylesController(IStyleRepository repo)
 {
     repository = repo;
 }
Esempio n. 34
0
 public StyleController(IStyleRepository styleRepository, IMapper mapper)
 {
     this.styleRepository = styleRepository;
     this.mapper          = mapper;
 }
Esempio n. 35
0
        public MappingProfile(
            IMovieRepository movieRepository,
            IGenreRepository genreRepository,
            ILanguageRepository languageRepository,
            IStyleRepository styleRepository,
            IReviewRepository reviewRepository,
            IMovieDataRepository movieDataRepository,
            IMovieDataGenreRepository movieDataGenreRepository,
            IMovieDataLanguageRepository movieDataLanguageRepository,
            IUnitOfWork unitOfWork)
        {
            string host = Environment.GetEnvironmentVariable("URL");

            CreateMap <Models.Review, Resources.Review>();
            #region Domain to Resource
            CreateMap <Models.User, Resources.User>();
            CreateMap <Models.Genre, Resources.KeyValuePair>()
            .ForMember(g => g.Id, opt => opt.MapFrom(gr => gr.IdGenre))
            .ForMember(g => g.Name, opt => opt.MapFrom(gr => gr.Name));
            CreateMap <Models.Language, Resources.KeyValuePair>()
            .ForMember(g => g.Id, opt => opt.MapFrom(gr => gr.IdLanguage))
            .ForMember(g => g.Name, opt => opt.MapFrom(gr => gr.Name));
            CreateMap <Models.Style, Resources.KeyValuePair>()
            .ForMember(g => g.Id, opt => opt.MapFrom(gr => gr.IdStyle))
            .ForMember(g => g.Name, opt => opt.MapFrom(gr => gr.Name));
            CreateMap <Models.Image, Resources.Image>()
            .ForMember(img => img.Url, opt => opt.MapFrom(img => $"{host}image/{img.Id}"));

            CreateMap <Models.Movie, Resources.Movie>()
            .ForMember(m => m.IdUser, opt => opt.MapFrom(m => m.IdUser))
            .ForMember(m => m.IdMovie, opt => opt.MapFrom(m => m.IdMovie))
            .AfterMap((movieModel, movie) =>
            {
                var data      = movieDataRepository.GetByMovieId(movieModel.IdMovie).Result;
                var genres    = new List <Resources.KeyValuePair>();
                var languages = new List <Resources.KeyValuePair>();

                movie.IdMovieData  = data.IdMovieData;
                movie.RegisterDate = data.RegisterDate;
                movie.Name         = data.Title;
                movie.Year         = data.Year;
                movieDataGenreRepository.GetAll().Result.Where(genre => genre.IdMovieData == data.IdMovieData)
                .Join(genreRepository.GetAll().Result, mdg => mdg.IdGenre, g => g.IdGenre, (mdg, g) => g)
                .ToList().ForEach(genre => {
                    genres.Add(new Resources.KeyValuePair {
                        Id = genre.IdGenre, Name = genre.Name
                    });
                });

                movieDataLanguageRepository.GetAll().Result.Where(language => language.IdMovieData == data.IdMovieData)
                .Join(languageRepository.GetAll().Result, mdl => mdl.IdLanguage, l => l.IdLanguage, (mdg, l) => l)
                .ToList().ForEach(language => {
                    languages.Add(new Resources.KeyValuePair {
                        Id = language.IdLanguage, Name = language.Name
                    });
                });
                movie.PlatFav = data.PlatFav;
                movie.Image   = new Resources.Image {
                    Id = data.ImageMongoId, Url = $"{host}image/{data.ImageMongoId}"
                };
                movie.Styles = new Resources.KeyValuePair[1]
                {
                    new Resources.KeyValuePair {
                        Id = data.IdStyle, Name = styleRepository.Get(data.IdStyle).Result.Name
                    }
                };
                movie.MetaScore      = data.MetaScore;
                movie.Imdb           = data.Imdb;
                movie.Director       = data.Director;
                movie.Popularity     = ScoreHelper.GetMoviePopularity(movie.IdMovie.Value, movieDataRepository, reviewRepository);
                movie.CommunityScore = ScoreHelper.GetMovieCommunityScore(movie.IdMovie.Value, reviewRepository);

                movie.Genres    = genres.ToArray();
                movie.Languages = languages.ToArray();
            });
            CreateMap <Models.MovieData, Resources.Movie>()
            .ForMember(m => m.Name, opt => opt.MapFrom(md => md.Title))
            .ForMember(m => m.Styles, opt => opt.MapFrom(md =>
                                                         new Resources.KeyValuePair[1] {
                new Resources.KeyValuePair {
                    Id = md.IdStyle, Name = styleRepository.GetAll().Result
                                            .FirstOrDefault(s => s.IdStyle == md.IdStyle).Name
                }
            }))
            .ForMember(m => m.Image, opt => opt.MapFrom(md =>
                                                        new Resources.Image {
                Id = md.ImageMongoId, Url = $"{host}image/{md.ImageMongoId}"
            }))
            .ForMember(m => m.CommunityScore, opt => opt.MapFrom(md => ScoreHelper.GetMovieCommunityScore(md.IdMovie, reviewRepository)))
            .ForMember(m => m.CommunityScore, opt => opt.MapFrom(md => ScoreHelper.GetMoviePopularity(md.IdMovie, movieDataRepository, reviewRepository)))
            .AfterMap((movieData, movie) =>
            {
                var genres    = new List <Resources.KeyValuePair>();
                var languages = new List <Resources.KeyValuePair>();

                movie.IdUser = movieRepository.Get(movieData.IdMovie).Result.IdUser;

                movieDataGenreRepository.GetAll().Result.Where(genre => genre.IdMovieData == movieData.IdMovieData)
                .Join(genreRepository.GetAll().Result, mdg => mdg.IdGenre, g => g.IdGenre, (mdg, g) => g)
                .ToList().ForEach(genre => {
                    genres.Add(new Resources.KeyValuePair {
                        Id = genre.IdGenre, Name = genre.Name
                    });
                });

                movieDataLanguageRepository.GetAll().Result.Where(language => language.IdMovieData == movieData.IdMovieData)
                .Join(languageRepository.GetAll().Result, mdl => mdl.IdLanguage, l => l.IdLanguage, (mdg, l) => l)
                .ToList().ForEach(language => {
                    languages.Add(new Resources.KeyValuePair {
                        Id = language.IdLanguage, Name = language.Name
                    });
                });

                movie.Genres    = genres.ToArray();
                movie.Languages = languages.ToArray();
            });
            #endregion

            #region Resource to Domain
            CreateMap <Resources.Movie, Models.Movie>()
            .ForMember(m => m.IdMovie, opt => opt.MapFrom(m => m.IdMovie))
            .ForMember(m => m.IdUser, opt => opt.MapFrom(m => m.IdUser));
            CreateMap <Resources.Movie, Models.MovieData>().BeforeMap((movie, movieData) =>
            {
                foreach (Resources.KeyValuePair genre in movie.Genres)
                {
                    if (genre.Id.Equals(null))
                    {
                        genreRepository.Create(new Models.Genre(genre.Name));
                        unitOfWork.CompleteAsync().Wait();
                    }
                }
                foreach (Resources.KeyValuePair language in movie.Languages)
                {
                    if (language.Id.Equals(null))
                    {
                        languageRepository.Create(new Models.Language(language.Name));
                        unitOfWork.CompleteAsync().Wait();
                    }
                }
            }).ForMember(m => m.ImageMongoId, opt => opt.MapFrom(m => m.Image.Id))
            .ForMember(m => m.Title, opt => opt.MapFrom(m => m.Name))
            .ForMember(m => m.IdStyle, opt => opt.MapFrom(m => m.Styles[0].Id));

            CreateMap <Resources.Image, Models.Image>()
            .ForMember(img => img.ObjectImage, opt => opt.Ignore())
            .ForMember(img => img.Id, opt => opt.MapFrom(img => img.Id));

            CreateMap <Resources.Review, Models.Review>();
            #endregion
        }
Esempio n. 36
0
 public StylesAdmin(IStyleRepository repo, ITitreRepository titreRepository)
 {
     _styleRepo       = repo;
     _titreRepository = titreRepository;
 }
Esempio n. 37
0
		public StylesController(IStyleRepository styleRepository)
		{
			_styleRepository = styleRepository;
		}
Esempio n. 38
0
 public StyleController(IStyleRepository styleRepository)
 {
     this._styleRepository = styleRepository;
 }