public ActionResult Create(RequisitionDocument requisitiondocument)
 {
     if (ModelState.IsValid) {
         requisitiondocumentRepository.InsertOrUpdate(requisitiondocument);
         requisitiondocumentRepository.Save();
         return RedirectToAction("Index");
     } else {
         ViewBag.PossibleRequisitions = requisitionRepository.All;
         return View(requisitiondocument);
     }
 }
 public ViewResult Search(RequisitionDocument searchRequisitionDocument)
 {
     if(searchRequisitionDocument!=null)
     {
                     }
                 return View("Index",requisitiondocumentRepository.AllIncluding(requisitiondocument => requisitiondocument.Requisition));
 }
 public ActionResult Create()
 {
     RequisitionDocument requisitiondocument = new RequisitionDocument();
     ViewBag.PossibleRequisitions = requisitionRepository.All;
     return View(requisitiondocument);
 }
 public void InsertOrUpdate(RequisitionDocument requisitiondocument)
 {
     if (requisitiondocument.RequisitionDocumentID == default(int)) {
         // New entity
         context.RequisitionDocument.Add(requisitiondocument);
     } else {
         // Existing entity
         context.Entry(requisitiondocument).State = EntityState.Modified;
     }
 }