refactor: arreglado formato de los repositorios
Signed-off-by: fede <federico.nicolas.polidoro@gmail.com>
This commit is contained in:
@@ -4,12 +4,17 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Modelo;
|
||||
|
||||
public abstract class RepositorioBase<T> where T : class, new()
|
||||
public abstract class RepositorioBase<T, S>
|
||||
where T : class, new()
|
||||
where S : new()
|
||||
{
|
||||
protected AlquilaFacilContext Context { get; set; } = new AlquilaFacilContext();
|
||||
|
||||
public abstract ReadOnlyCollection<T> Listar();
|
||||
|
||||
private static readonly S instance = new();
|
||||
public static S Singleton { get{return instance;}}
|
||||
|
||||
public bool Guardar(){
|
||||
bool ret = false;
|
||||
try
|
||||
@@ -24,5 +29,4 @@ public abstract class RepositorioBase<T> where T : class, new()
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user