public ActionResult Create(ProductDetail productDetail)
 {
     if (ModelState.IsValid)
     {
         db.ProductDetails.Add(productDetail);
         db.SaveChanges();
         return(RedirectToAction("List"));
     }
     return(View(productDetail));
 }
        public static void addToDB()
        {
            AuthorizeDemoEntities db             = new AuthorizeDemoEntities();
            CollectAllName        collectAllName = new CollectAllName();
            List <string>         urlList        = collectAllName.getDetails();

            foreach (var url in urlList)
            {
                var checkURL = db.RouteTables.SingleOrDefault(m => m.URL.Equals(url));
                if (checkURL == null)
                {
                    db.RouteTables.Add(new RouteTable {
                        URL = url
                    });
                    db.SaveChanges();
                }
            }
        }