Terminado Todo lo relacionado a los repositorios
This commit is contained in:
@@ -4,35 +4,37 @@ namespace Modelo
|
||||
{
|
||||
public sealed class RepositorioProveedor : Repositorio<Proveedor>
|
||||
{
|
||||
|
||||
public RepositorioProveedor(Context context)
|
||||
{
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public override IEnumerable<Proveedor> Listar()
|
||||
public override List<Proveedor> Listar()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
return context.Proveedores.ToList();
|
||||
}
|
||||
|
||||
public override Proveedor ObtenerPorId(int Tid)
|
||||
public Proveedor ObtenerPorId(long Tid)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
Proveedor pro = context.Proveedores.First(x => x.Cuit == Tid);
|
||||
return pro ?? new Proveedor();
|
||||
}
|
||||
|
||||
public override void Add(Proveedor t)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
context.Proveedores.Add(t);
|
||||
}
|
||||
|
||||
public override void Del(Proveedor t)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
Proveedor pro = context.Proveedores.First(x => x.Cuit == t.Cuit);
|
||||
if (pro == null) return;
|
||||
context.Proveedores.Remove(pro);
|
||||
}
|
||||
|
||||
public override void Mod(Proveedor t)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
context.Proveedores.Update(t);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user