public static ShortFarmingLocationDto ToShortFarmingLocationDto(this FarmingLocation entity) { if (entity == null) { return(null); } ShortFarmingLocationDto dto = new ShortFarmingLocationDto(); dto.CopyPropertiesFrom(entity); return(dto); }
public static FarmingLocationDto ToFarmingLocationDto(this FarmingLocation entity) { if (entity == null) { return(null); } FarmingLocationDto dto = new FarmingLocationDto(); dto.CopyPropertiesFrom(entity); dto.Areas = entity.Areas.ToAreaDto(); dto.Type = entity.Type.ToDictionaryItemDto <LocationType>(); return(dto); }