Convention: Command properties should not contain public setters
SebastianKuesters opened this issue · comments
Sebastian Küsters commented
public class DeleteToDoListCommand : ICommand
{
public Guid Id { get; } // This, if not changed
public Guid TenantId { get; private set; } // This, if changed by method
public DeleteToDoListCommand(Guid id, Guid tenantId)
{
Id = id;
TenantId = tenantId;
}
public void ChangeTenantId() {
// ....
}
}
Sebastian Küsters commented
This could not work, if we do a Adapt<>
and need assign a property later.
Maybe we will not use the Adapt
here anymore, because then you can forget the not adaptable properties later...