HAY UN AVANCE

This commit is contained in:
fedpo
2024-08-27 04:36:00 +01:00
parent 670190c44b
commit 2428f615a6
76 changed files with 5786 additions and 496 deletions

View File

@@ -4,7 +4,7 @@ namespace Modelo
{
public abstract class Repositorio<T>
{
protected Context context;
protected Context context = new Context(); //no voy a usar esta instancia igualmente
public abstract List<T> Listar();
public abstract void Add(T t);
public abstract void Del(T t);
@@ -16,11 +16,13 @@ namespace Modelo
try
{
context.SaveChanges();
context.Dispose();
context = new Context();
ret = true;
}
catch (DbUpdateException)
catch (DbUpdateException ex)
{
throw;
Console.Error.WriteLine(ex);
}
return ret;