public ActionResult ModalWindow(MemoryType mem)
 {
     if(mem is MemoryType)
     {
         db.MemoryTypes.Add(mem);
         db.SaveChanges();
     }
     ViewBag.DDListMemory = new SelectList(db.MemoryTypes, "Id", "Name");
     return PartialView("DDListMemory");
 }
 public ActionResult DDListMemory(MemoryType memt)
 {
     ViewBag.DDListMemory = new SelectList(db.MemoryTypes, "Id", "Name",memt?.Id);
     return PartialView();
 }