using skydiveLogs_api.Data.Interface; using skydiveLogs_api.Model; using System; using System.Collections.Generic; using System.Text; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System.IO; namespace skydiveLogs_api.Data { public class AircraftRepository : IAircraftRepository { public IEnumerable GetAllAircrafts() { IEnumerable result = new List(); using (StreamReader file = File.OpenText(@"Data/Aircraft.json")) using (JsonTextReader reader = new JsonTextReader(file)) { var jsonResult = (JArray)JToken.ReadFrom(reader); result = jsonResult.ToObject>(); } return result; } } }