I'm updating a Product table in db via an object of EF Model class by this code:

[HttpPost]
public ActionResult CONFIRM_PRODUCT_EDIT(ADD_PRODUCT_MODEL model) {
    PRODUCT product = db.PRODUCTs.Find(model.PRODUCT.PRODUCT_ID);
    product = model.PRODUCT;

    db.SaveChanges();

    return RedirectToAction("ecommerce_products_show");
}

Whole code executes smoothly but it doesn't update data in database. Am I missing something to get the job done?

Related posts

Recent Viewed