예제 #1
0
        public GenresController (   IGenreRepository genreRepository,
                                    ISongRepository songRepository,
                                    IValidationRules validationRules,
                                    IAccount account)
        {
            _genreRepository = genreRepository;
            _songRepository = songRepository;
            _validationRules = validationRules;

            var currentUserName = GetCurrentSessionUser();
            if (currentUserName.Length > 0)
                _currentUser = account.GetUserByUserName(currentUserName);
            _common = new CommonSong(account, currentUserName);
        }
예제 #2
0
        public UsersController( IAccount account,
                                IBandRepository bandRepository,
                                IUserRepository userRepository,
                                IValidationRules validationRules)
        {
            _account = account;
            _bandRepository = bandRepository;
            _userRepository = userRepository;
            _validationRules = validationRules;

            var currentUserName = GetCurrentSessionUser();
            if (currentUserName.Length > 0)
                _currentUser = account.GetUserByUserName(currentUserName);
            _common = new CommonSong(account, currentUserName);
        }
예제 #3
0
        public GigsController(  IBandRepository bandRepository,
                                IGigRepository gigRepository,
                                ISetlistRepository setlistRepository,
                                IValidationRules validationRules, 
                                IAccount account)
        {
            _bandRepository = bandRepository;
            _gigRepository = gigRepository;
            _setlistRepository = setlistRepository;
            _validationRules = validationRules;

            var currentUserName = GetCurrentSessionUser();
            if (currentUserName.Length > 0)
                _currentUser = account.GetUserByUserName(currentUserName);
            _common = new CommonSong(account, currentUserName);
        }
예제 #4
0
        public BandsController( IUserRepository userRepository,
                                IBandRepository bandRepository,
                                ISongRepository songRepository,
                                IMemberRepository memberRepository,
                                IValidationRules validationRules,
                                IAccount account)
        {
            _userRepository = userRepository;
            _bandRepository = bandRepository;
            _songRepository = songRepository;
            _memberRepository = memberRepository;
            _validationRules = validationRules;

            var currentUserName = GetCurrentSessionUser();
            if (currentUserName.Length > 0)
                _currentUser = account.GetUserByUserName(currentUserName);
            _common = new CommonSong(account, currentUserName);
        }
예제 #5
0
        public SetlistsController(  IBandRepository bandRepository, 
                                    ISetlistRepository setlistRepository,
                                    ISetSongRepository setSongRepository,
                                    ISongRepository songRepository,
                                    IGigRepository gigRepository, 
                                    IAccount account, 
                                    IValidationRules validationRules)
        {
            var currentUserName = GetCurrentSessionUser();
            _currentUser = (currentUserName.Length > 0) ? account.GetUserByUserName(currentUserName) : null;

            _bandRepository = bandRepository;
            _setlistRepository = setlistRepository;
            _setSongRepository = setSongRepository;
            _songRepository = songRepository;
            _gigRepository = gigRepository;
            _validationRules = validationRules;
            _common = new CommonSong(account, currentUserName);
        }