using AspNetMvcSample.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace AspNetMvcSample.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            using (BloggingContext db = new BloggingContext())
            {
                db.Blogs.Add(new Blog { Url = "wwww.xcode.me" });
                db.SaveChanges();
            }

            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}