Ejemplo n.º 1
0
        public async Task <ActionResult> Edit([Bind(Include = "OrderId,OrderCreated,RenterName,RenterMobile,RenterAddress,Source,ShipDate,ExpectedReturnDate,Status,Note,DressId")] Order order)
        {
            if (ModelState.IsValid)
            {
                db.Entry(order).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.DressId = new SelectList(db.Dresses, "DressId", "Drescription", order.DressId);
            return(View(order));
        }
Ejemplo n.º 2
0
 public void Update(T entity)
 {
     _dbContext.Entry(entity).State = EntityState.Modified;
 }