using System.Collections.Generic; using System.Linq; using CounterDrone.Core.Models; using SQLite; namespace CounterDrone.Core.Repository { public class RoutePlanRepository : BaseRepository { public RoutePlanRepository(SQLiteConnection db) : base(db) { } public List GetByScenarioId(string scenarioId) { return Db.Table().Where(r => r.ScenarioId == scenarioId).ToList(); } public RoutePlan GetByTaskAndWave(string scenarioId, string waveId) { return Db.Table() .FirstOrDefault(r => r.ScenarioId == scenarioId && r.WaveId == waveId); } } }