private GeolocationDto(IGeolocationDto dto) { GeonameId = dto.GeonameId; City = dto.City; ContinentCode = dto.ContinentCode; ContinentName = dto.ContinentName; CountryCode = dto.CountryCode; CountryName = dto.CountryName; Latitude = dto.Latitude; Longitude = dto.Longitude; TimeZoneCode = dto.TimeZoneCode; RegionCode = dto.RegionCode; RegionName = dto.RegionName; PostalCode = dto.PostalCode; }
public static GeolocationDto Create(IGeolocationDto dto) => dto is GeolocationDto result ? result : new GeolocationDto(dto);