public UserAccountView(UserAccountCreatedEvent e, int membershipProviderId) { Id = e.Id.Literal; MembershipProviderId = membershipProviderId; UserName = e.UserName; UserNameLowercase = UserName.ToLower(); EMail = e.EMail.ToString(); EMailLowercase = EMail.ToLower(); }
public UserAccountView BuildUserAccountView(string userName = null, string email = null) { UserAccountCreatedEvent e = new UserAccountCreatedEvent(new UserAccountId(), "John", new EMail("*****@*****.**")); UserAccountView u = new UserAccountView(e, 1); UserAccountViewProvider.Add(u); RegisterInstance(u); return(u); }
private void HandleUserAccountCreatedEvent(UserAccountCreatedEvent e) { this.UserName = e.UserName; this.Password = e.Password; this.DisplayName = e.DisplayName; this.Email = e.Email; this.ContactPhone = e.ContactPhone; Address address = new Address { Country = e.ContactAddressCountry, State = e.ContactAddressState, City = e.ContactAddressCity, Street = e.ContactAddressStreet, Zip = e.ContactAddressZip }; this.ContactAddress = address; }
public void Apply(UserAccountCreatedEvent aggregateEvent) { Name = aggregateEvent.Name; }
public void RestoreFrom(UserAccountCreatedEvent e) { Id = e.Id; UserName = e.UserName; EMail = e.EMail; }
public void Apply(UserAccountCreatedEvent aggregateEvent) { State.Apply(aggregateEvent); }