Hello, I have a question related to the instancing mode DbContext the controller. What's the difference between the two methods below instantiation?
1.
private ApplicationDbContext _db;
public ApplicationDbContext db
{
get { return _db ?? new ApplicationDbContext(); }
set { _db = value; }
}
2.
private readonly ApplicationDbContext db = new ApplicationDbContext();
For now I use the second, however in several models of ASP.NET MVC 5 see that come as standard the first option ...