Same as with Data Transfer Objects (DTO).
the domain for these two types of objects is different, so this is not a violation of DRY .
Consider the following example:
class Customer
{
public int Age
}
And an example view model:
class CustomerViewModel
{
public string Age;
public bool IsValid()
{
return string.IsNullOrEmpty(Age) == false;
}
}
Differential domains - types of differnet properties - different objects.
source
share