コード例 #1
0
        public ActionResult ListAssignments()
        {
            var model = new ListAssignmentViewModel
            {
                Assignments = assignmentService.GetAllAssignments()
            };

            return(this.View(model));
        }
コード例 #2
0
 public IActionResult GetAllAssignments()
 {
     try
     {
         var jsonString = _assignmentService.GetAllAssignments();
         return(Ok(jsonString));
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #3
0
 public async Task <IActionResult> GetAllAssignments()
 {
     return(Ok(await _assignmentService.GetAllAssignments()));
 }
コード例 #4
0
        public ActionResult Index()
        {
            var assignments = _assignmentsService.GetAllAssignments();

            return(View(assignments));
        }
コード例 #5
0
 public IEnumerable <AssignmentModel> Get()
 {
     return(assignmentService.GetAllAssignments());
 }