public ActionResult New() { MakeupProductEdit makeupModel = new MakeupProductEdit { Brands = db.Brands.ToList() }; return(View(makeupModel)); }
public ActionResult Edit(int?id) { //check to see if makeup product with this id exists in the database MakeupProduct makeupProduct = new MakeupProduct(); makeupProduct = db.MakeupProducts.Find(id); if (id == null || makeupProduct == null) { return(HttpNotFound()); } else { MakeupProductEdit makeupEdit = new MakeupProductEdit { MakeupProduct = makeupProduct, Brands = db.Brands.ToList() }; return(View(makeupEdit)); } }