Magic comments like // AssignAll enable is a bit off-putting.
It would be more natural and discoverable with:
[AssignAll]
public PersonDto ToDto(Person entity)
{
return new PersonDto
{
FullName = $"{entity.FirstName} {entity.LastName}"
};
}
Instead of:
public PersonDto ToDto(Person entity)
{
// AssignAll enable
return new PersonDto
{
FullName = $"{entity.FirstName} {entity.LastName}"
};
// AssignAll disable
}
Magic comments like
// AssignAll enableis a bit off-putting.It would be more natural and discoverable with:
Instead of: