Skip to content

Instantly share code, notes, and snippets.

@StephanyBatista
Created January 22, 2018 16:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StephanyBatista/53145b1afa3512a9a5fa6a66696127fd to your computer and use it in GitHub Desktop.
Save StephanyBatista/53145b1afa3512a9a5fa6a66696127fd to your computer and use it in GitHub Desktop.
public class ProductController : Controller
{
public IActionResult Index()
{
var applicationDbContext = new ApplicationDbContext(null);
var repository = new ProductRepository(applicationDbContext);
return View(repository.GetAll());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment