I have done a few examples in MVC wherein I was declaring my DB in models, then I create my controller and then link a view to each of the methods in Controller.
I have been reading all the net that MVC is loosely coupled. Can you please give me solution on how to generate a View alone for a project without having any models declared.
Just don't use a model in your view:
Controller
public ActionResult Index()
{
return View();
}
View (Index.cshtml)
@{
ViewBag.Title = "Home Page";
}
<h1>Hello World!</h1>
The date of today is: @DateTime.Now.ToShortDateString()