Skip to content

Instantly share code, notes, and snippets.

@adaam2
Created July 21, 2016 11:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adaam2/478edea109a41efedf27082b62627913 to your computer and use it in GitHub Desktop.
Save adaam2/478edea109a41efedf27082b62627913 to your computer and use it in GitHub Desktop.
MVC
@model Product
<h1>@Model.Name</h1>
public class Product
{
public string Name { get; set; }
}
public class ProductController : Controller
{
public ActionResult Index()
{
var product = new Product();
product.Name = "A product";
return View("Index", product);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment