public IActionResult GetOrdersBySellerId(int sellerId) { var isValidUser = _usersRepository.GetUserById(sellerId); var isSeller = _usersRepository.CheckIfUserIsSeller(sellerId); if (isValidUser == null) { return(NotFound("Not a real user, my dude")); } else if (isSeller == null) { return(NotFound("That user doesn't sell anything, mon frère")); } else { var orders = _ordersRepository.GetOrdersBySeller(sellerId); var thereAreNoOrders = !orders.Any(); if (thereAreNoOrders) { return(NotFound("Keine zutreffende Bestellungen, Alter")); } return(Ok(orders)); } }