Awesome, thanks! clarity makes sense
If it doesn't inherit from FullAuditedEntityDto, then would it automatically add the CreatorUserId on save/update?
so, essentially what you are saying is that because CreatorUserId exists and is NULL, it's getting overwritten? and that if it doesn't exist in the "input" Dto, then the CreatorUserId will be populated on save?
Here is the Dto:
As it's derived from FullAuditedEntityDto, shouldn't it include the populated property?
public class CreateOrEditGroupDto : FullAuditedEntityDto<int?>
{
[Required]
public string Name { get; set; }
public string Description { get; set; }
//public Collection<ContactDto> Contacts { get; set; }
}
public async Task<GetGroupForEditOutput> GetGroupForEdit(EntityDto input)
{
var group = await _groupRepository.FirstOrDefaultAsync(input.Id);
var output = new GetGroupForEditOutput {Group = ObjectMapper.Map<CreateOrEditGroupDto>(group)};
return output;
}