public ActionResult DeleteConfirmed(long id)
        {
            ApartmentRentee apartmentRentee = db.ApartmentRentees.Find(id);

            db.ApartmentRentees.Remove(apartmentRentee);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ApartmentRenteeID,ApartmentRenteeName,ApartmentRenteeNumber,ApartmentRenterIDNumber,DateOfRegistration")] ApartmentRentee apartmentRentee)
 {
     if (ModelState.IsValid)
     {
         db.Entry(apartmentRentee).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(apartmentRentee));
 }
        public ActionResult Create([Bind(Include = "ApartmentRenteeID,ApartmentRenteeName,ApartmentRenteeNumber,ApartmentRenterIDNumber,DateOfRegistration")] ApartmentRentee apartmentRentee)
        {
            if (ModelState.IsValid)
            {
                db.ApartmentRentees.Add(apartmentRentee);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(apartmentRentee));
        }
        // GET: ApartmentRentees/Delete/5
        public ActionResult Delete(long?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ApartmentRentee apartmentRentee = db.ApartmentRentees.Find(id);

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