Exemple #1
0
 public void CopyTo(ref tenant tenant)
 {
     foreach (var propertyInfo in tenant.GetType().GetProperties())
     {
         if (!propertyInfo.Name.Contains("Id") && (propertyInfo.PropertyType.IsValueType || propertyInfo.PropertyType.Name == "String"))
         {
             propertyInfo.SetValue(tenant, propertyInfo.GetValue(this));
         }
     }
 }
Exemple #2
0
 public NewTenantModel(tenant tenant)
 {
     foreach (var propertyInfo in tenant.GetType().GetProperties())
     {
         if (propertyInfo.PropertyType.IsValueType || propertyInfo.PropertyType.Name == "String")
         {
             propertyInfo.SetValue(this, propertyInfo.GetValue(tenant));
         }
     }
     Email    = tenant.user.Email;
     Password = tenant.user.Password;
     Deleted  = tenant.user.Deleted;
 }