public IHttpActionResult GetDatabaseNumbers() { var planets = planetRepository.GetPlanetsCount(); var flights = flightRepository.GetFlightsCount(); var flightPaths = flightPathRepository.GetFlightPathsCount(); var starships = starshipRepository.GetStarshipsCount(); var climates = climateRepository.GetClimatesCount(); var terrains = terrainRepository.GetTerrainsCount(); var races = raceRepository.GetRacesCount(); var raceClassifications = raceClassificationRepository.GetRaceClassificationCount(); var users = ApplicationUserRepository.GetApplicationUsersCount(); var orders = orderRepository.GetOrdersCount(); var tickets = ticketRepository.GetTicketsCount(); var revenue = orderRepository.GetTotalOrderRevenue(); var dto = new DatabaseNumbersDto() { DatabaseTimeStamp = DateTime.Now.ToString(), Planets = planets, Flights = flights, Flightpaths = flightPaths, Starships = starships, Climates = climates, Terrains = terrains, Races = races, RaceClassification = raceClassifications, Users = users, Orders = orders, Tickets = tickets, Revenue = Math.Round(revenue, 2, MidpointRounding.AwayFromZero) }; return(Ok(dto)); }