using Microsoft.EntityFrameworkCore; using REC_HUMA.CORE.Entities; using REC_HUMA.CORE.Interfaces; using REC_HUMA.INFRASTRUCTURE; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace REC_HUMA.INFRASTRUCTURE.Repositories { public class PuestoRepo : IPuestoRepo { private readonly RECHUMAContext _Context; public PuestoRepo(RECHUMAContext Context) { _Context = Context; } public Task DeletePuesto(int IdPuesto) { throw new NotImplementedException(); } public async Task GetPuesto(int IdPuesto) { try { var puesto = await _Context.Puesto.Where(p => p.IdPuesto == IdPuesto).FirstOrDefaultAsync(); return puesto; } catch (Exception ex) { throw; } } public async Task> GetPuestos() { try { var puestos = await _Context.Puesto.AsNoTracking().ToListAsync(); return puestos; } catch (Exception ex) { throw; } } public Task PostUniversidad(Puesto puesto) { throw new NotImplementedException(); } public Task PutPuesto(Puesto puesto) { throw new NotImplementedException(); } } }