private static void SetAddress(Address address, RegisterLocalAdminViewModel localAdminViewModel) { localAdminViewModel.Street = address.Street; localAdminViewModel.Square = address.Square; localAdminViewModel.PostalCode = address.PostalCode; localAdminViewModel.State = address.State; localAdminViewModel.City = address.City; }
public static RegisterLocalAdminViewModel ToRegisterLocalAdminViewModel(this LocalManager localAdmin) { var localAdminViewModel = new RegisterLocalAdminViewModel { CPF = localAdmin.CPF, Email = localAdmin.Email, FirstName = localAdmin.FirstName, LastName = localAdmin.LastName, Number = localAdmin.StreetNumber.ToString(), PhoneNumber = localAdmin.Telephone, RG = localAdmin.RG, Complement = localAdmin.Complement }; SetAddress(localAdmin.Address, localAdminViewModel); return localAdminViewModel; }