This commit is contained in:
Zeeshaun
2026-03-13 09:27:34 -05:00
parent 256f579489
commit a675c5f5b0
381 changed files with 20992 additions and 0 deletions
@@ -0,0 +1,35 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using LCU.API.Internal.RepoApi.Repos.Models;
using LCU.API.Internal.RepoApi.Repos.Persistence;
using Microsoft.EntityFrameworkCore;
namespace LCU.API.Internal.RepoApi.Repos.Repositories
{
public class RefundStatusRepository : BaseRepository, IRefundStatusRepository
{
public RefundStatusRepository(AppDbContext context) : base(context) {}
public async Task<IReadOnlyCollection<RefundStatus>> ListAsync()
{
return await _context.RefundStatuses.ToListAsync();
}
public async Task<RefundStatus> FindByRepoIdAsync(int repoId)
{
return await _context.RefundStatuses.Where(refundStatus => refundStatus.RepoId == repoId).FirstOrDefaultAsync();
}
public async Task<RefundStatus> AddAsync(RefundStatus refundStatus)
{
var result = await _context.RefundStatuses.AddAsync(refundStatus);
return result.Entity;
}
public void Update(RefundStatus refundStatus)
{
_context.RefundStatuses.Update(refundStatus);
}
}
}