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