本文整理汇总了C#中ProviderType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# ProviderType.ToString方法的具体用法?C# ProviderType.ToString怎么用?C# ProviderType.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProviderType
的用法示例。
在下文中一共展示了ProviderType.ToString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetProvidersByType
public List<Provider> GetProvidersByType(ProviderType providerType, int takeMax)
{
using (var connection = DbContextFactory.CreateConnection())
{
return connection
.Query<Provider>("Provider_GetLatestByType", new { ProviderType = providerType.ToString(), Max = takeMax }, commandType: CommandType.StoredProcedure)
.ToList();
}
}
示例2: Search
public List<Provider> Search(ProviderType providerType, string keyword, int? serviceTypeId, string providerSuburb, string providerState, int? make)
{
using (var conn = DbContextFactory.CreateConnection())
{
return conn
.Query<Provider>("Provider_Search", new
{
providerType = providerType.ToString(),
keyword,
serviceTypeId,
providerSuburb,
providerState,
make
}, commandType: CommandType.StoredProcedure)
.ToList();
}
}
示例3: Provider
public ConnectionBuilder Provider(ProviderType providerType) {
_connection.Provider = providerType.ToString().ToLower();
return this;
}
示例4: FindByIdentityAsync
public async Task<DomainUser> FindByIdentityAsync(ProviderType provider, string userIdentifier)
{
var user = await _userRepository.FindByIdentityAsync(provider.ToString(), userIdentifier);
if (user == null)
{
throw new NotFoundException(string.Format("User with identity '{0}:{1}' was not found.", provider, userIdentifier));
}
CheckUserState(user);
return _mapper.Map<UserEntity, DomainUser>(user);
}
示例5: DeleteMembersipAsync
public async Task DeleteMembersipAsync(string userId, ProviderType provider)
{
var user = await _userRepository.GetAsync(userId);
if (user == null)
{
throw new NotFoundException(string.Format("Could not find user '{0}'.", userId));
}
await _userRepository.DeleteMembershipAsync(userId, provider.ToString());
}
示例6: SetProviderType
/// <summary>
/// Sets specified provider class type
/// </summary>
private static void SetProviderType(ProviderType providerType, Type classType)
{
_loadedProviders[providerType.ToString()] = classType;
}
示例7: GetProviderType
/// <summary>
/// Gets specified provider class type.
/// </summary>
private static Type GetProviderType(ProviderType providerType)
{
return (Type)_loadedProviders[providerType.ToString()];
}