Пример #1
0
        public IHttpActionResult Backend_Detail_Insert(BackendGameViewModelItem request)
        {
            BackendGameViewModel viewmodel = new BackendGameViewModel();

            try
            {
                // TODO
            }
            catch (Exception ex)
            {
                return(Error(viewmodel, ex));
            }

            return(Ok(viewmodel));
        }
Пример #2
0
        public IHttpActionResult Backend_Detail(Int32 id)
        {
            BackendGameViewModel         viewmodel = new BackendGameViewModel();
            TournamentGameDataController dataCtrl  = new TournamentGameDataController();

            try
            {
                viewmodel.Data.FromModel(dataCtrl.GetItem(id));
            }
            catch (Exception ex)
            {
                return(Error(viewmodel, ex));
            }

            return(Ok(viewmodel));
        }
Пример #3
0
        public IHttpActionResult Backend_Detail_Update(Int32 id, BackendGameViewModelItem request)
        {
            BackendGameViewModel         viewmodel = new BackendGameViewModel();
            TournamentGameDataController dataCtrl  = new TournamentGameDataController();

            try
            {
                var data = dataCtrl.Update(request.ToModel());
                viewmodel.Data.FromModel(data);
            }
            catch (Exception ex)
            {
                return(Error(viewmodel, ex));
            }

            return(Ok(viewmodel, "Eintrag wurde gespeichert."));
        }