本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}