예제 #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()));
 }
        public ActionResult Index()
        {
            var assignments = _assignmentsService.GetAllAssignments();

            return(View(assignments));
        }
 public IEnumerable <AssignmentModel> Get()
 {
     return(assignmentService.GetAllAssignments());
 }