示例#1
0
 public ActionResult Create()
 {
     var model = new EventFieldsModel
     {
         PossibleRaids = GetPossibleRaids()
     };
     return View(model);
 }
示例#2
0
 public ActionResult Edit(EventFieldsModel model)
 {
     if (ModelState.IsValid)
     {
         Mapper.Map<Entry>(model);
         _context.SaveChanges();
         return RedirectToAction("Edit", new {id = model.Id});
     }
     return View(Mapper.Map<EventFieldsModel>(model));
 }