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; }
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; }
internal static Address Activate(Guid id, Customer customer, string line1, string line2, string phone) { return new Address(id, customer, line1, line2, phone); }
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; }
public static Customer Activate(Guid id, string name, bool update = false) { var customer = new Customer(id, name); if (update) customer.SetDirty(); return customer; }