I want talk about the MVC.
this is the aspnet mvc default action;
public IActionResult About() { ViewData["Message"] = "Your application description page."; return View(); }
We need ViewData to contain the Message field;
Why not like this?
public IActionResult About() {
//The Content of About Page var Message = "Your application description page."; return View(); }
Just create a model class with "ViewBag" name by roslyn compiler.
public class ViewBag { //<summery> //The Content of About Page. //<summery> public string Message="Your application description page."; }
when I write ViewBag. it prompt the field list with commit.
And it's cool.No dynamic and reflaction.