当前位置: 首页>>代码示例>>C#>>正文


C# IAccount.GetUserByUserName方法代码示例

本文整理汇总了C#中IAccount.GetUserByUserName方法的典型用法代码示例。如果您正苦于以下问题:C# IAccount.GetUserByUserName方法的具体用法?C# IAccount.GetUserByUserName怎么用?C# IAccount.GetUserByUserName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IAccount的用法示例。


在下文中一共展示了IAccount.GetUserByUserName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GenresController

        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);
        }
开发者ID:jyuma,项目名称:SetGenerator,代码行数:14,代码来源:GenresController.cs

示例2: UsersController

        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);
        }
开发者ID:jyuma,项目名称:SetGenerator,代码行数:15,代码来源:UsersController.cs

示例3: GigsController

        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);
        }
开发者ID:jyuma,项目名称:SetGenerator,代码行数:16,代码来源:GigsController.cs

示例4: BandsController

        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);
        }
开发者ID:jyuma,项目名称:SetGenerator,代码行数:18,代码来源:BandsController.cs

示例5: SetlistsController

        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);
        }
开发者ID:jyuma,项目名称:SetGenerator,代码行数:19,代码来源:SetlistsController.cs


注:本文中的IAccount.GetUserByUserName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。