public ActionResult Save(CharactersDto data) { var currentChars = Context.GetAll <GmCharacterView>(); foreach (var gmCharacterView in currentChars) { Context.Delete <GmCharacterView>(gmCharacterView.ID); } foreach (var characterGuid in data.CharacterGuids) { var newView = new GmCharacterView { CharacterGuid = characterGuid, }; Context.CreateOrUpdate(newView); } var dto = new CharactersDto(Context); return(View("GM/GM", dto)); }
// // GET: /GMOverview/ public ActionResult Index() { var dto = new CharactersDto(Context); return(View("GM/GM", dto)); }