añadido contructor
This commit is contained in:
@@ -5,7 +5,13 @@ namespace Modelo
|
||||
{
|
||||
public sealed class RepositorioCategoria : IRepositorio<Categoria>
|
||||
{
|
||||
private Context context = new Context();
|
||||
private Context context;
|
||||
|
||||
public RepositorioCategoria(Context context)
|
||||
{
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public override Categoria ObtenerPorId(int Tid)
|
||||
{
|
||||
return context.Categorias.Find(Tid);
|
||||
|
||||
Reference in New Issue
Block a user