/* Constructor with locationtype */ public LocationTypeContract(LocationType locationType) { this.LocationTypeId = locationType.location_type_id; this.IconID = (locationType.icon_id != null) ? (int)(locationType.icon_id) : 0; this.Name = new Name(); this.Name.Swedish = locationType.location_type_swe; this.Name.English = locationType.location_type_eng; this.IconUrl = (locationType.Icon != null) ? locationType.Icon.icon_link : ""; }
/* LocationType to LocationType contract */ public static LocationTypeContract ToContract(LocationType locationType) { return new LocationTypeContract(locationType); }