コード例 #1
0
 internal static Address Create(Customer customer, Version version, string line1, string line2, string phone)
 {
     var createdBy = CurrentContext.Session.OwnerName;
     var address = new Address(Guid.NewGuid(), customer, line1, line2, phone);
     address.SetSystemFields(version, DateTime.UtcNow, createdBy);
     address.isNew = true;
     return address;
 }
コード例 #2
0
 private Address(Guid id, Customer customer, string line1, string line2, string phone)
     : base(id)
 {
     this.customer = customer;
     this.line1 = line1;
     this.line2 = line2;
     this.phone = phone;
 }
コード例 #3
0
 internal static Address Activate(Guid id, Customer customer, string line1, string line2, string phone)
 {
     return new Address(id, customer, line1, line2, phone);
 }
コード例 #4
0
 public static Customer Create(string name)
 {
     var createdBy = CurrentContext.Session.OwnerName;
     var customer = new Customer(Guid.NewGuid(), name);
     customer.SetSystemFields(Version.Create(createdBy), DateTime.UtcNow, createdBy);
     customer.isNew = true;
     return customer;
 }
コード例 #5
0
 public static Customer Activate(Guid id, string name, bool update = false)
 {
     var customer = new Customer(id, name);
     if (update) customer.SetDirty();
     return customer;
 }