Exemple #1
0
        public async Task <IActionResult> GetAllAssignmentsAsync()
        {
            try
            {
                var assignments = await _assignmentService.GetAllAssignmentsAsync();

                return(Ok(assignments));
            }
            catch (BussinessException ex)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError, $"Internal server error: {ex.Message}"));
            }
        }
Exemple #2
0
 public async Task <ActionResult <IEnumerable <AssignmentDto> > > GetAllAssignmentsAsync()
 {
     return(Ok(await _assignmentService.GetAllAssignmentsAsync()));
 }