I\'m working on a basic application.
This is the main controller:
public ActionResult Index()
{
var all = _context.mainz.ToList();
Use ViewBag or ViewData to pass any kind of information when you are bounded to one Model.
ViewBag is dynamic : @ViewBag. - just fill data in controller and you will have it in view.
ViewData - is a dictionary and use is ViewData["any_name"]
Of course appropriate casting is required in a view.
If you want to store global variable accessed to all views then it is on application level :
Application["Counter"] = 1234;
Also you can pass model to partial :
@Html.Partial("count", Model)