コード例 #1
0
        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));
        }
コード例 #2
0
        //
        // GET: /GMOverview/

        public ActionResult Index()
        {
            var dto = new CharactersDto(Context);

            return(View("GM/GM", dto));
        }