last ...
This commit is contained in:
@@ -26,11 +26,13 @@ namespace xIds.Providers
|
||||
/// Add Specified Item ...
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
/// <param name="apiKey"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<XApiKeyDto> AddApiKeyAsync(
|
||||
XApiKeyDto item,
|
||||
string apiKey = null,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
CancellationToken cancellationToken = default
|
||||
)
|
||||
@@ -85,7 +87,12 @@ namespace xIds.Providers
|
||||
item.CreatedOn = DateTime.UtcNow;
|
||||
|
||||
//
|
||||
var entity = item.MapConvert<XApiKey, XApiKeyDto>();
|
||||
var entity = item.MapConvert<XApiKey, XApiKeyDto>(mapperConfigurationExp);
|
||||
if (!apiKey.IsNullOrEmpty())
|
||||
{
|
||||
entity.Key = apiKey;
|
||||
}
|
||||
|
||||
var entry = await dbContext.ApiKeys.AddAsync(
|
||||
entity: entity,
|
||||
cancellationToken: cancellationToken
|
||||
|
||||
Reference in New Issue
Block a user