I have been posting data to a Full Audited Entity via the API. As it is FullAuditedEntity
, it should automatically be created with creatorId, creationTime and a couple other column values. But when I checked in the database, CreatorUserID
is null
even though CreationTime
is there. It should be 1
cos I posted with the default admin. Furthermore, when I delete the rows, the same happens: I can only see DeletionTime
but not DeleterUserId
.
Below is the data captured by the API Endpoints that I can see using breakpoints:
I experimented with two Object Mapping Methods creating output
and output2
but both of them gives the same null
value for CreatorUserId
. By right, both CreatorUserId
and CreationTime
should have values by this stage.
[AbpAuthorize]
public async Task<Rule> CreateAsync(CreateRuleInput input)
{
Rule output = Mapper.Map<CreateRuleInput, Rule>(input);
Rule output2 = ObjectMapper.Map< Rule>(input);
return await _ruleManager.Create(output);
}
Is there anything wrong with my object mapping functions?