Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Payment : ValueObject
- {
- public DateTime PaymentDate { get; private set; }
- public PaymentType PaymentType { get; private set; }
- public static Payment CreateMoney(DateTime paymentDate)
- {
- return new Payment
- {
- PaymentType = PaymentType.MoneyPayment,
- PaymentDate = paymentDate
- };
- }
- public static Payment CreateFree(DateTime paymentDate)
- {
- return new Payment
- {
- PaymentType = PaymentType.FreePayment,
- PaymentDate = paymentDate
- };
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement