コード例 #1
0
ファイル: Customer.cs プロジェクト: pacmad/OnlineTheatre
        public Customer(CustomerName customerName, CustomerEmail customerEmail) : this()
        {
            _name  = customerName ?? throw new ArgumentNullException(nameof(customerName));
            _email = customerEmail ?? throw new ArgumentNullException(nameof(customerEmail));

            MoneySpent = Dollars.Of(0);
            Status     = CustomerStatus.Regular;
        }
コード例 #2
0
 public Customer GetCustomerByEmail(CustomerEmail email)
 {
     return(UnitOfWork.Query <Customer>()
            .SingleOrDefault(x => x.Email == email));
 }