コード例 #1
0
        public IHttpActionResult Get()
        {
            try
            {
                IQueryable <Bank> bank = null;
                bank = _repository.Get();

                return(Ok(bank
                          .OrderBy(d => d.BankName)
                          .ToList()));
            }
            catch (Exception ex)
            {
                return(InternalServerError());
            }
        }
コード例 #2
0
        public IActionResult Create(int caseid, string bankname)
        {
            // server side pagenation ?
            Submission submission = new Submission()
            {
                DateSubmitted = DateTime.Now,
                Case          = _cases.Get(caseid),
                Bank          = _banks.Get(bankname),
                Status        = _status.Get("Submitted")
            }
            ;

            _submissions.Add(submission);
            _cases.UpdateCaseStatus(submission.Case, "In Progress");

            Task.WaitAll(Task.Delay(1000));
            return(RedirectToAction("CreatePage", "Submissions", new { caseId = caseid }));
        }