هذا الالتزام موجود في:
2025-10-05 22:25:53 +03:00
الأصل de0f47c739
التزام 9511f1928b
13 ملفات معدلة مع 562 إضافات و0 حذوفات

عرض الملف

@@ -0,0 +1,22 @@
using System.Text.Json;
using WondersAPI.Models;
namespace WondersAPI.Data
{
public static class DataSeedingApplication
{
public static List<Wonder> SeedWonders(string filePath)
{
if (!File.Exists(filePath))
throw new FileNotFoundException($"Seed data file not found: {filePath}");
var json = File.ReadAllText(filePath);
var wonders = JsonSerializer.Deserialize<List<Wonder>>(json, new JsonSerializerOptions
{
PropertyNameCaseInsensitive = true
});
return wonders ?? new List<Wonder>();
}
}
}