示例#1
0
        public virtual ActionResult Add(Site site)
        {
            if (!ModelState.IsValid)
            {
                return View();
            }

            _db.Sites.Add(site);
            _db.SaveChanges();
            return RedirectToAction(MVC.Sites.Index());
        }
示例#2
0
 public static IHtmlString Favicon(this HtmlHelper html, Site site, int height = 16, int width = 16)
 {
     return html.Img(site.FaviconUrl, site.DomainName, height, width);
 }