This question already has an answer here:
My code:
public abstract class Entity
{
// I need a method here
}
public abstract class ValueObject<T> where T : ValueObject<T>
{
}
public class User : Entity
{
public Password Password { get; private set; }
}
public class Password : ValueObject<Password>
{
}
I need a method in the Entity class that gets all properties of type ValueObject
Aucun commentaire:
Enregistrer un commentaire