< Summary

Information
Class: FAU.DataAccess.Repositories.MotivoBajaRepository
Assembly: FAU.DataAccess
File(s): /home/runner/work/Sistema.Liquidacion.BE/Sistema.Liquidacion.BE/FAU.DataAccess/Repositories/MotivoBajaRepository.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 23
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%210%
GetAllVigentesAsync()100%210%
GetByIdAsync()100%210%
ExistsAsync()100%210%

File(s)

/home/runner/work/Sistema.Liquidacion.BE/Sistema.Liquidacion.BE/FAU.DataAccess/Repositories/MotivoBajaRepository.cs

#LineLine coverage
 1using FAU.Entidades;
 2using Microsoft.EntityFrameworkCore;
 3
 4namespace FAU.DataAccess.Repositories;
 5
 6public class MotivoBajaRepository : IMotivoBajaRepository
 7{
 8    private readonly ApplicationDbContext _context;
 9
 010    public MotivoBajaRepository(ApplicationDbContext context) => _context = context;
 11
 12    public async Task<IEnumerable<MotivoBaja>> GetAllVigentesAsync() =>
 013        await _context.MotivosBaja
 014            .Where(m => m.Vigente)
 015            .OrderBy(m => m.Denominacion)
 016            .ToListAsync();
 17
 18    public async Task<MotivoBaja?> GetByIdAsync(long id) =>
 019        await _context.MotivosBaja.FindAsync(id);
 20
 21    public async Task<bool> ExistsAsync(long id) =>
 022        await _context.MotivosBaja.AnyAsync(m => m.Id == id && m.Vigente);
 23}