How to bind dropdownlist in asp.net MVC using Entity framework.

How to bind dropdownlist in asp.net MVC using Entity framework., someone asked me to explain?

 In this article I am going to explain How to create DropDownList using MVC .net.

Creat a  controller with name home

  Private  MyDataBaseEntities db = new MyDataBaseEntities();
   public ActionResult Create()
        {
            ViewBag.Category = new SelectList(db.Categories, "CategoryId", "Name");
            return View();
        }

 Create a view  Create.cshtml

 Select Department: @Html.DropDownList("Category", "Select Category")

Post your comments / questions