private string CreateHealthPage() { StringBuilder healthBuilder = new StringBuilder(); healthBuilder.AppendLine("<h1>Health Information</h1>"); healthBuilder.AppendLine("<h2>Database Connection String</h2>"); var connectionConnectionString = repository.Database.Connection.ConnectionString; healthBuilder.AppendLine($"Data Source: {connectionConnectionString}"); healthBuilder.AppendLine("<h2>Data Health</h2>"); healthBuilder.AppendLine($"Number of Auctions: {repository.GetAuctions().Count()}"); return(healthBuilder.ToString()); }
public IHttpActionResult Read() { return(Ok(repository.GetAuctions().ToList().Select(a => new AuctionDto(a)))); }