public Contact(string id, string ownerId, string ownerName, string source, string firstname, string lastname, string email, string company, string phone, string address, string city, string country, string aboutme) : this() { Id = id; Firstname = firstname; Lastname = lastname; Email = email; Country = country; Phone = phone; Address = address; City = city; Country = country; Aboutme = aboutme; CreatedBy = ownerId; CreatedByName = ownerName; Source = source; CreatedDate = DateTime.UtcNow; UpdatedDate = DateTime.UtcNow; var contactCreatedDomainEvent = new ContactCreatedDomainEvent { Email = email, Firstname = firstname, Lastname = lastname, CreatedBy = CreatedBy }; this.AddDomainEvent(contactCreatedDomainEvent); }
public Contact(string ownerId, string firstname, string lastname, string email) : this() { Firstname = firstname; Lastname = lastname; Email = email; CreatedBy = ownerId; CreatedDate = DateTime.UtcNow; UpdatedDate = DateTime.UtcNow; var contactCreatedDomainEvent = new ContactCreatedDomainEvent { Email = email, Firstname = firstname, Lastname = lastname, CreatedBy = CreatedBy }; this.AddDomainEvent(contactCreatedDomainEvent); }