Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ insert_final_newline = true
trim_trailing_whitespace = true
rulers = 120

[*.{bat,cmd,ps1}]
end_of_line = crlf

# ReSharper properties
resharper_align_multiline_statement_conditions = false
resharper_keep_existing_initializer_arrangement = false
Expand Down
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Normalize to LF on commit; checkout follows local Git config
* text=auto

# Scripts with interpreter lines must have LF
*.sh text eol=lf
*.bash text eol=lf

# Windows scripts
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
# Fetch_First_2_Items_Between

```json
[
{
"Id": 2,
"Name": "Product 0-1",
"Description": null,
"Price": 0.0,
"ImageFileName": null,
"TypeId": 1,
"Type": null,
"BrandId": 1,
"Brand": null,
"AvailableStock": 0,
"RestockThreshold": 0,
"MaxStockThreshold": 0,
"OnReorder": false
},
{
"Id": 11,
"Name": "Product 0-10",
"Description": null,
"Price": 0.0,
"ImageFileName": null,
"TypeId": 1,
"Type": null,
"BrandId": 1,
"Brand": null,
"AvailableStock": 0,
"RestockThreshold": 0,
"MaxStockThreshold": 0,
"OnReorder": false
}
[
{
"Id": 2,
"Name": "Product 0-1",
"Description": null,
"Price": 0.0,
"ImageFileName": null,
"TypeId": 1,
"Type": null,
"BrandId": 1,
"Brand": null,
"AvailableStock": 0,
"RestockThreshold": 0,
"MaxStockThreshold": 0,
"OnReorder": false
},
{
"Id": 11,
"Name": "Product 0-10",
"Description": null,
"Price": 0.0,
"ImageFileName": null,
"TypeId": 1,
"Type": null,
"BrandId": 1,
"Brand": null,
"AvailableStock": 0,
"RestockThreshold": 0,
"MaxStockThreshold": 0,
"OnReorder": false
}
]
```
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
# Fetch_Last_2_Items_Between

```json
[
{
"Id": 9998,
"Name": "Product 99-97",
"Description": null,
"Price": 0.0,
"ImageFileName": null,
"TypeId": 1,
"Type": null,
"BrandId": 100,
"Brand": null,
"AvailableStock": 0,
"RestockThreshold": 0,
"MaxStockThreshold": 0,
"OnReorder": false
},
{
"Id": 9999,
"Name": "Product 99-98",
"Description": null,
"Price": 0.0,
"ImageFileName": null,
"TypeId": 1,
"Type": null,
"BrandId": 100,
"Brand": null,
"AvailableStock": 0,
"RestockThreshold": 0,
"MaxStockThreshold": 0,
"OnReorder": false
}
[
{
"Id": 9998,
"Name": "Product 99-97",
"Description": null,
"Price": 0.0,
"ImageFileName": null,
"TypeId": 1,
"Type": null,
"BrandId": 100,
"Brand": null,
"AvailableStock": 0,
"RestockThreshold": 0,
"MaxStockThreshold": 0,
"OnReorder": false
},
{
"Id": 9999,
"Name": "Product 99-98",
"Description": null,
"Price": 0.0,
"ImageFileName": null,
"TypeId": 1,
"Type": null,
"BrandId": 100,
"Brand": null,
"AvailableStock": 0,
"RestockThreshold": 0,
"MaxStockThreshold": 0,
"OnReorder": false
}
]
```
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"ConnectionStrings": {
"CatalogDB": "Host=localhost;Port=5432;Username=admin;Password=root;Database=CatalogDB"
}
}
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"ConnectionStrings": {
"CatalogDB": "Host=localhost;Port=5432;Username=admin;Password=root;Database=CatalogDB"
}
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"Logging": {
"LogLevel": {
"Default": "Error",
"Microsoft.AspNetCore": "Warning"
}
},
"Identity": {
"Url": "http://identity",
"Audience": "orders"
},
"AllowedHosts": "*",
"ConnectionStrings": {
"CatalogDB": "Host=localhost;Port=5432;Username=admin;Password=root;Database=CatalogDB"
}
}
{
"Logging": {
"LogLevel": {
"Default": "Error",
"Microsoft.AspNetCore": "Warning"
}
},
"Identity": {
"Url": "http://identity",
"Audience": "orders"
},
"AllowedHosts": "*",
"ConnectionStrings": {
"CatalogDB": "Host=localhost;Port=5432;Username=admin;Password=root;Database=CatalogDB"
}
}
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
var builder = DistributedApplication.CreateBuilder(args);
var postgres = builder.AddPostgres("postgres")
.WithArgs("-c", "max_connections=500")
.WithArgs("-c", "shared_buffers=512MB")
.WithArgs("-c", "effective_cache_size=1GB")
.WithArgs("-c", "maintenance_work_mem=128MB")
.WithArgs("-c", "checkpoint_completion_target=0.9")
.WithArgs("-c", "wal_buffers=16MB")
.WithArgs("-c", "default_statistics_target=100")
.WithArgs("-c", "random_page_cost=1.1")
.WithArgs("-c", "work_mem=32MB");
var database = postgres.AddDatabase("catalog-db");
builder
.AddProject<Projects.eShop_Catalog_API>("catalog-api")
.WithReference(database)
.WaitFor(database);
builder.Build().Run();
var builder = DistributedApplication.CreateBuilder(args);

var postgres = builder.AddPostgres("postgres")
.WithArgs("-c", "max_connections=500")
.WithArgs("-c", "shared_buffers=512MB")
.WithArgs("-c", "effective_cache_size=1GB")
.WithArgs("-c", "maintenance_work_mem=128MB")
.WithArgs("-c", "checkpoint_completion_target=0.9")
.WithArgs("-c", "wal_buffers=16MB")
.WithArgs("-c", "default_statistics_target=100")
.WithArgs("-c", "random_page_cost=1.1")
.WithArgs("-c", "work_mem=32MB");

var database = postgres.AddDatabase("catalog-db");

builder
.AddProject<Projects.eShop_Catalog_API>("catalog-api")
.WithReference(database)
.WaitFor(database);

builder.Build().Run();
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:15100",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19155",
"ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20157",
"ASPIRE_ALLOW_UNSECURED_TRANSPORT": "true"
}
}
}
}
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:15100",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19155",
"ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20157",
"ASPIRE_ALLOW_UNSECURED_TRANSPORT": "true"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Aspire.Hosting.Dcp": "Warning"
}
}
}
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Aspire.Hosting.Dcp": "Warning"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<Sdk Name="Aspire.AppHost.Sdk" Version="13.0.2" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UserSecretsId>f2d3a820-9a6b-4453-96e4-3e0ba86bd53d</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Aspire.Hosting.AppHost" />
<PackageReference Include="Aspire.Hosting.PostgreSQL" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Catalog.API\eShop.Catalog.API.csproj" />
</ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">

<Sdk Name="Aspire.AppHost.Sdk" Version="13.0.2" />

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UserSecretsId>f2d3a820-9a6b-4453-96e4-3e0ba86bd53d</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Aspire.Hosting.AppHost" />
<PackageReference Include="Aspire.Hosting.PostgreSQL" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Catalog.API\eShop.Catalog.API.csproj" />
</ItemGroup>

</Project>
Loading