empezé a hacer cosas con el dbcontext, termine la clase de repositorio y añadi/implemente los skeleton de varios repositorios
This commit is contained in:
@@ -3,8 +3,40 @@ using Entidades;
|
||||
|
||||
namespace Modelo
|
||||
{
|
||||
public sealed class RepositorioFactura : IRepositorio<Factura>
|
||||
public sealed class RepositorioFactura : Repositorio<Factura>
|
||||
{
|
||||
|
||||
|
||||
public RepositorioFactura(Context context)
|
||||
{
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public IEnumerable<Factura> Listar()
|
||||
{
|
||||
context.Facturas.ToList();
|
||||
}
|
||||
|
||||
public Factura ObtenerPorId(int Tid)
|
||||
{
|
||||
Factura fac = context.Facturas.Find(Tid);
|
||||
return fac ?? new Factura();
|
||||
}
|
||||
|
||||
public void Add(Factura t)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Del(Factura t)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Mod(Factura t)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user