Hi @Mel ,
System.Web.Mvc.WebViewPage<TModel>.Model.get returned null
The error is because you haven't defined Model in your View.
You need to fill your model and send it to the View.
Try the following:
.cshtml
@model MVCname.Models.Your Model
Controller
public ActionResult Index()
{
using (MvcDB dataBase = new MvcDB())
{
}
return View(< YourModel > );
}
If possible, you can provide code that reproduces the problem so we can better help you troubleshoot.
Best regards,
Lan Huang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.