public void Save(PropertyTypesViewModel p) { PROPERTYTYPES pT = new PROPERTYTYPES(); pT.TYPE = this.TYPE; this.TYPE = ""; DbContext.PROPERTYTYPES.Add(pT); DbContext.SaveChanges(); p.PropertyTypesList.Add(new PropertyTypeViewModel(pT)); }
public PropertyTypeViewModel(PROPERTYTYPES propType) { this.ID = propType.ID; this.type = propType.TYPE; }