public ActionResult DeleteConfirmed(int id)

        {
            RealStateRegistryInterestDepartment RSRIDepartment = db.RealStateRegistryInterestDepartments.Find(id);

            RSRIDepartment.realStateRegistryInterestDepartments_isDeleted = true;
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit(RealStateRegistryInterestDepartment realStateRegistryInterestDepartment)
 {
     if (ModelState.IsValid)
     {
         db.Entry(realStateRegistryInterestDepartment).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(realStateRegistryInterestDepartment));
 }
        public ActionResult Create(RealStateRegistryInterestDepartment realStateRegistryInterestDepartment)
        {
            if (ModelState.IsValid)
            {
                db.RealStateRegistryInterestDepartments.Add(realStateRegistryInterestDepartment);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(realStateRegistryInterestDepartment));
        }
        // GET: RealStateRegistryInterestDepartments/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            RealStateRegistryInterestDepartment realStateRegistryInterestDepartment = db.RealStateRegistryInterestDepartments.Find(id);

            if (realStateRegistryInterestDepartment == null)
            {
                return(HttpNotFound());
            }
            return(View(realStateRegistryInterestDepartment));
        }