Exemplo n.º 1
0
        public async Task <ActionResult> Update(FurnitureSalon salon)
        {
            if (ModelState.IsValid)
            {
                await _db.Update(salon);

                return(Json(new { success = true, message = "Updated Successfully" }, JsonRequestBehavior.AllowGet));
            }
            return(View(salon));
        }
 public async Task Update(FurnitureSalon furnitureSalon)
 {
     db.Entry(furnitureSalon).State = System.Data.Entity.EntityState.Modified;
     try
     {
         await db.SaveChangesAsync();
     }
     catch (DbUpdateConcurrencyException)
     {
         throw;
     }
 }
Exemplo n.º 3
0
        public async Task <ActionResult> Add(FurnitureSalon salon)
        {
            if (ModelState.IsValid)
            {
                await _db.Add(salon);

                await _db.SaveAsync();

                return(Json(new { success = true, message = "Added Successfully" }));
            }
            return(View(salon));
        }
 public async Task <FurnitureSalon> Add(FurnitureSalon furnitureSalon)
 {
     return(db.FurnitureSalons.Add(furnitureSalon));
 }