13 Answer(s)
-
0
using System; using Volo.Abp.Auditing; namespace Volo.Abp.Domain.Entities.Auditing; /// <summary> /// Implements <see cref="IFullAuditedObject"/> to be a base class for full-audited aggregate roots. /// </summary> [Serializable] public abstract class FullAuditedAggregateRoot : AuditedAggregateRoot, IFullAuditedObject { /// <inheritdoc /> public virtual bool IsDeleted { get; set; } /// <inheritdoc /> public virtual Guid? DeleterId { get; set; } /// <inheritdoc /> public virtual DateTime? DeletionTime { get; set; } } /// <summary> /// Implements <see cref="IFullAuditedObject"/> to be a base class for full-audited aggregate roots. /// </summary> /// <typeparam name="TKey">Type of the primary key of the entity</typeparam> [Serializable] public abstract class FullAuditedAggregateRoot<TKey> : AuditedAggregateRoot<TKey>, IFullAuditedObject { /// <inheritdoc /> public virtual bool IsDeleted { get; set; } /// <inheritdoc /> public virtual Guid? DeleterId { get; set; } /// <inheritdoc /> public virtual DateTime? DeletionTime { get; set; } protected FullAuditedAggregateRoot() { } protected FullAuditedAggregateRoot(TKey id) : base(id) { } }Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
- create a entity in Database.
- try to insert record in database.
- update that record by updating lastmodifierId.
var operation = await _operationRepository.GetAsync(id); operation.LastModificationTime = DateTime.UtcNow; operation.LastModifierId = await _authorizationHelper.GetCurrentUserId(); ObjectMapper.Map(input, operation); operation = await _operationRepository.UpdateAsync(operation, autoSave: true); return ObjectMapper.Map<Operation, OperationDto>(operation);
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
hi
Do you mean the
LastModifierIdofoperationisnullafter_operationRepository.UpdateAsync(operation, autoSave: true);?Can you share a template project? liming.ma@volosoft.com
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)