public async Task <ActionResult> Edit([Bind(Include = "CarId,Name,Year,Color,Avalaible,TimeAssurancy,DelayExchange")] Car car) { if (ModelState.IsValid) { db.Entry(car).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(car)); }
public async Task <ActionResult> Edit([Bind(Include = "OrderID,DateOrder,DateDelivery")] Order order) { if (ModelState.IsValid) { db.Entry(order).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(order)); }
public async Task <ActionResult> Edit([Bind(Include = "SellerId,DateOfBirth,Lastname,Firstname,Address,Postcode,City,PhoneNumber")] Seller seller) { if (ModelState.IsValid) { db.Entry(seller).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(seller)); }
public async Task <ActionResult> Edit([Bind(Include = "ClientId,Lastname,Firstname,Address,Postcode,City,PhoneNumber")] Client client) { if (ModelState.IsValid) { db.Entry(client).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(client)); }
public async Task <ActionResult> Edit([Bind(Include = "BrandId,Name,Description")] Brand brand) { if (ModelState.IsValid) { db.Entry(brand).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(brand)); }
public async Task <ActionResult> Edit([Bind(Include = "CategoryId,Name,Description,Price,Tva")] Category category, long brandId) { if (ModelState.IsValid) { category = db.DbCategory.Find(category.CategoryId); category.Brand = category.Brand = db.DbBrand.Find(brandId); //category.Brand = db.DbBrand.Find(brandId); //db.DbBrand.Attach(category.Brand); //db.DbCategory.Attach(category); db.Entry(category).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(category)); }