using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using LCU.Library.Internal.IncentiveApiModels.Entities; using LCU.API.Internal.Operations.IncentiveApiLib.Persistence; using Microsoft.EntityFrameworkCore; namespace LCU.API.Internal.Operations.IncentiveApiLib.Repositories; public class GoalChangeRepository : BaseRepository, IGoalChangeRepository { public GoalChangeRepository(IApplicationDbContext context) : base(context) { } public async Task SaveGoalChangeAsync(GoalChange goalChange) { await _context.GoalChanges.AddAsync(goalChange); return goalChange.Id; } public async Task> GetGoalChangesAsync() { return await _context.GoalChanges .OrderBy(t => t.Id) .ToListAsync(); } }