public Property(string name, IPropertyTypeViewModel propertyType) { _name = name; PropertyType = new PropertyTypeViewModel(propertyType); PropertyType.TypeChanged += PropertyTypeOnTypeChanged; TypeAbbreviature = PropertyType.IsCollection ? PropertyType.SelectedCollectionType?.FirstOrDefault().ToString() : PropertyType.SelectedType?.FirstOrDefault().ToString(); }
public List <PropertyTypeViewModel> PropertyTypeList() { List <PropertyType> type = _commonListRepository.PropertyTypeList(); List <PropertyTypeViewModel> statesVM = new List <PropertyTypeViewModel>(); foreach (PropertyType t in type) { PropertyTypeViewModel tVM = new PropertyTypeViewModel(); tVM.PropertyTypeId = t.PropertyTypeId; tVM.PropertyTypeName = t.PropertyTypeName; statesVM.Add(tVM); } return(statesVM); }