public ServizioViewModel(ServizioViewModel model) { Offerta = new OffertaServizioViewModel(); foreach (PropertyInfo propertyInfo in model.GetType().GetProperties()) { this.GetType().GetProperty(propertyInfo.Name).SetValue(this, propertyInfo.GetValue(model)); } }
public ServizioViewModel(ServizioViewModel model) : base(model) { foreach (PropertyInfo propertyInfo in model.GetType().GetProperties()) { this.GetType().GetProperty(propertyInfo.Name).SetValue(this, propertyInfo.GetValue(model)); } TipoAcquisto = TipoAcquisto.Servizio; }