public IHttpActionResult Get() { try { IQueryable <Bank> bank = null; bank = _repository.Get(); return(Ok(bank .OrderBy(d => d.BankName) .ToList())); } catch (Exception ex) { return(InternalServerError()); } }
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 })); }