// GET: Tanah/Edit/5
        public ActionResult Edit(int id)
        {
            if ((bool)Session["Login"])
            {
                MetaniContext     context    = new MetaniContext();
                List <JenisTanah> jenisTanah = context.GetAllJenisTanah();
                List <Lokasi>     lokasi     = context.GetAllLokasiTani();
                Tanah             tanah      = context.FindTanah(id);

                TanahLokasi tanahLokasi = new TanahLokasi {
                    jenisTanah = jenisTanah.ToArray(), lokasi = lokasi.ToArray(), tanah = tanah
                };

                return(View(tanahLokasi));
            }

            return(RedirectToAction("Login", "Admin"));
        }