feat(auth): AD-Authentifizierungsprüfung hinzugefügt
This commit is contained in:
@@ -48,7 +48,7 @@ namespace DigitalData.Core.Application
|
||||
{
|
||||
var entity = _mapper.MapOrThrow<TEntity>(createDto);
|
||||
var createdEntity = await _repository.CreateAsync(entity);
|
||||
if(createdEntity is null)
|
||||
if (createdEntity is null)
|
||||
return Failed<TId>();
|
||||
else
|
||||
return Successful(KeyValueOf(createdEntity));
|
||||
@@ -145,7 +145,7 @@ namespace DigitalData.Core.Application
|
||||
/// <returns>The ID of the entity.</returns>
|
||||
protected virtual TId KeyValueOf(TEntity entity)
|
||||
{
|
||||
if(_keyPropertyInfo is null)
|
||||
if (_keyPropertyInfo is null)
|
||||
throw new InvalidOperationException($"No property with [Key] attribute found on {typeof(TEntity).Name} entity.");
|
||||
|
||||
object idObj = _keyPropertyInfo?.GetValue(entity) ?? throw new InvalidOperationException($"The ID property of {typeof(TEntity).Name} entity cannot be null.");
|
||||
|
||||
Reference in New Issue
Block a user