Skip to content

Commit 3e001b4

Browse files
committed
Remove unnecesary comments and review settings
1 parent cfd1a37 commit 3e001b4

5 files changed

Lines changed: 11 additions & 20 deletions

File tree

src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public async Task<IActionResult> Items(int pageSize = 10, int pageIndex = 0)
2929
.LongCountAsync();
3030

3131
var itemsOnPage = await _context.CatalogItems
32+
.OrderBy(c=>c.Name)
3233
.Skip(pageSize * pageIndex)
3334
.Take(pageSize)
3435
.ToListAsync();

src/Services/Catalog/Catalog.API/Startup.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ public Startup(IHostingEnvironment env)
1717
{
1818
var builder = new ConfigurationBuilder()
1919
.SetBasePath(env.ContentRootPath)
20-
.AddJsonFile($"settings.{env.EnvironmentName}.json", optional: false)
21-
.AddEnvironmentVariables();
20+
.AddJsonFile($"settings.json", optional: false, reloadOnChange: true)
21+
.AddJsonFile($"settings.{env.EnvironmentName}.json", optional: true);
22+
23+
builder.AddEnvironmentVariables();
2224

2325

2426
Configuration = builder.Build();
@@ -33,7 +35,8 @@ public void ConfigureServices(IServiceCollection services)
3335
c.UseSqlServer(Configuration["ConnectionString"]);
3436
c.ConfigureWarnings(wb =>
3537
{
36-
wb.Throw(RelationalEventId.QueryClientEvaluationWarning);
38+
//By default, in this application, we don't want to have client evaluations
39+
wb.Log(RelationalEventId.QueryClientEvaluationWarning);
3740
});
3841
});
3942

@@ -45,10 +48,10 @@ public void ConfigureServices(IServiceCollection services)
4548
options.DescribeAllEnumsAsStrings();
4649
options.SingleApiVersion(new Swashbuckle.Swagger.Model.Info()
4750
{
48-
Title = "Values API",
51+
Title = "Catalog HTTP API",
4952
Version = "v1",
50-
Description = "An API API With Swagger for RC2",
51-
TermsOfService = "None"
53+
Description = "The Catalog Service HTTP API",
54+
TermsOfService = "Terms Of Service"
5255
});
5356
});
5457

@@ -59,10 +62,8 @@ public void ConfigureServices(IServiceCollection services)
5962
});
6063
}
6164

62-
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
6365
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
6466
{
65-
6667
//Configure logs
6768

6869
if (env.IsDevelopment())

src/Services/Catalog/Catalog.API/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"wwwroot",
4848
"Views",
4949
"Areas/**/Views",
50-
"settings.Production.json",
50+
"settings.json",
5151
"web.config",
5252
"project.json",
5353
"Dockerfile"
File renamed without changes.

src/Services/Catalog/Catalog.API/settings.production.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)