public static Floor convertToFloor(FloorDTO f) { Floor floor = new Floor(); floor.FloorID = f.id; floor.Descrizione = f.descrizione; floor.Nome = f.nomeFloor; floor.Building = BuildingConverter.convertToBuilding(f.building); return(floor); }
public static Thing convertToThing(ThingDTO tDTO) { Thing thing = new Thing(); thing.ThingID = tDTO.id; thing.Num_Uscite = tDTO.numUscite; thing.Prezzo = tDTO.prezzo; if (tDTO.customer != null) { thing.Customer = CustomerConverter.convertToCustomer(tDTO.customer); } else { thing.Customer = null; } thing.Building = BuildingConverter.convertToBuilding(tDTO.building); return(thing); }