I have a controller in ASP.NET MVC application.
private GipDbContext db = new GipDbContext();
private Employee employeeObj;
public ActionResult Edit(int? id)
Controllers are instantiated for each request. Once you request TimeSeriesData
, the controller that was created for the request to Edit
has already been disposed. If you need to hold on to a piece of data between requests, you must either put it in Session
or TempData
(both of which use sessions).