public async Task <ActionResult> Edit([Bind(Include = "ID,Name,CategoryID")] SubCategoryMaster subCategoryMaster) { if (ModelState.IsValid) { db.Entry(subCategoryMaster).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(subCategoryMaster)); }
public async Task <ActionResult> Edit([Bind(Include = "ID,Name,SupportTeam,LoginID,Password")] EmployeeMaster employeeMaster) { if (ModelState.IsValid) { db.Entry(employeeMaster).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(employeeMaster)); }
public async Task <ActionResult> Edit([Bind(Include = "Name,Address,ImagePath")] ImageUploader imageUploader) { if (ModelState.IsValid) { db.Entry(imageUploader).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(imageUploader)); }
public async Task <ActionResult> Edit([Bind(Include = "ID,Name")] EmployeeType employeeType) { if (ModelState.IsValid) { db.Entry(employeeType).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(employeeType)); }
public async Task <ActionResult> Edit([Bind(Include = "ID,EmployeeID,SupportTeam,ClientID,ClientName,CategoryID,Description,Notes,Date,AssignedDate,DeliveryDate,Status")] DailyTask dailyTask) { if (ModelState.IsValid) { _db.Entry(dailyTask).State = EntityState.Modified; await _db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(dailyTask)); }
public virtual void Update(T entity) { dbSet.Attach(entity); dataContext.Entry(entity).State = EntityState.Modified; }