protected virtual IContactMechStateCreated Map(ICreateContactMech c) { var stateEventId = new ContactMechEventId(c.ContactMechId, c.Version); IContactMechStateCreated e = NewContactMechStateCreated(stateEventId); e.ContactMechTypeId = c.ContactMechTypeId; e.InfoString = c.InfoString; e.ToName = c.ToName; e.AttnName = c.AttnName; e.Address1 = c.Address1; e.Address2 = c.Address2; e.Directions = c.Directions; e.City = c.City; e.PostalCode = c.PostalCode; e.PostalCodeExt = c.PostalCodeExt; e.CountryGeoId = c.CountryGeoId; e.StateProvinceGeoId = c.StateProvinceGeoId; e.CountyGeoId = c.CountyGeoId; e.PostalCodeGeoId = c.PostalCodeGeoId; e.GeoPointId = c.GeoPointId; e.CountryCode = c.CountryCode; e.AreaCode = c.AreaCode; e.ContactNumber = c.ContactNumber; e.AskForName = c.AskForName; e.Active = c.Active; e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); var version = c.Version; return(e); }
public virtual void Create(ICreateContactMech c) { IContactMechStateCreated e = Map(c); Apply(e); }
public virtual void When(ICreateContactMech c) { Update(c, ar => ar.Create(c)); }
void IContactMechApplicationService.When(ICreateContactMech c) { this.When((CreateContactMechDto)c); }