Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add doc for lab 1 #11

Merged
merged 5 commits into from
Feb 7, 2024
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
271 changes: 271 additions & 0 deletions labs/1-Create-Catalog-API/1. Create Catalog API.md

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added labs/1-Create-Catalog-API/img/catalog-db-erd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added labs/1-Create-Catalog-API/img/pgadmin-aspire.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@
<RootNamespace>eShop.Catalog.Data.Manager</RootNamespace>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
</PropertyGroup>

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

<ItemGroup>
<PackageReference Include="Aspire.Npgsql.EntityFrameworkCore.PostgreSQL" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
<PackageReference Include="Aspire.Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0-preview.3.24081.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
<RootNamespace>eShop.Catalog.Data</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Aspire.Npgsql.EntityFrameworkCore.PostgreSQL" />
<PackageReference Include="Aspire.Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0-preview.3.24081.13" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
namespace eShop.Catalog.API.Model;

public class PaginatedItems<TEntity>(int pageIndex, int pageSize, long count, IEnumerable<TEntity> data) where TEntity : class
public class PaginatedItems<TItem>(int pageIndex, int pageSize, long count, IEnumerable<TItem> data) where TItem : class
{
public int PageIndex { get; } = pageIndex;

public int PageSize { get; } = pageSize;

public long Count { get; } = count;

public IEnumerable<TEntity> Data { get;} = data;
public IEnumerable<TItem> Data { get;} = data;
}
4 changes: 2 additions & 2 deletions labs/3-Add-Identity/src/Catalog.API/Model/PaginatedItems.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
namespace eShop.Catalog.API.Model;

public class PaginatedItems<TEntity>(int pageIndex, int pageSize, long count, IEnumerable<TEntity> data) where TEntity : class
public class PaginatedItems<TItem>(int pageIndex, int pageSize, long count, IEnumerable<TItem> data) where TItem : class
{
public int PageIndex { get; } = pageIndex;

public int PageSize { get; } = pageSize;

public long Count { get; } = count;

public IEnumerable<TEntity> Data { get;} = data;
public IEnumerable<TItem> Data { get;} = data;
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
namespace eShop.Catalog.API.Model;

public class PaginatedItems<TEntity>(int pageIndex, int pageSize, long count, IEnumerable<TEntity> data) where TEntity : class
public class PaginatedItems<TItem>(int pageIndex, int pageSize, long count, IEnumerable<TItem> data) where TItem : class
{
public int PageIndex { get; } = pageIndex;

public int PageSize { get; } = pageSize;

public long Count { get; } = count;

public IEnumerable<TEntity> Data { get;} = data;
public IEnumerable<TItem> Data { get;} = data;
}
4 changes: 2 additions & 2 deletions labs/5-Add-Checkout/src/Catalog.API/Model/PaginatedItems.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
namespace eShop.Catalog.API.Model;

public class PaginatedItems<TEntity>(int pageIndex, int pageSize, long count, IEnumerable<TEntity> data) where TEntity : class
public class PaginatedItems<TItem>(int pageIndex, int pageSize, long count, IEnumerable<TItem> data) where TItem : class
{
public int PageIndex { get; } = pageIndex;

public int PageSize { get; } = pageSize;

public long Count { get; } = count;

public IEnumerable<TEntity> Data { get;} = data;
public IEnumerable<TItem> Data { get;} = data;
}
4 changes: 2 additions & 2 deletions labs/6-Add-Resiliency/src/Catalog.API/Model/PaginatedItems.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
namespace eShop.Catalog.API.Model;

public class PaginatedItems<TEntity>(int pageIndex, int pageSize, long count, IEnumerable<TEntity> data) where TEntity : class
public class PaginatedItems<TItem>(int pageIndex, int pageSize, long count, IEnumerable<TItem> data) where TItem : class
{
public int PageIndex { get; } = pageIndex;

public int PageSize { get; } = pageSize;

public long Count { get; } = count;

public IEnumerable<TEntity> Data { get;} = data;
public IEnumerable<TItem> Data { get;} = data;
}
5 changes: 3 additions & 2 deletions src/Catalog.API/Model/PaginatedItems.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
namespace eShop.Catalog.API.Model;

public class PaginatedItems<TEntity>(int pageIndex, int pageSize, long count, IEnumerable<TEntity> data) where TEntity : class
public class PaginatedItems<TItem>(int pageIndex, int pageSize, long count, IEnumerable<TItem> data)
where TItem : class
{
public int PageIndex { get; } = pageIndex;

public int PageSize { get; } = pageSize;

public long Count { get; } = count;

public IEnumerable<TEntity> Data { get;} = data;
public IEnumerable<TItem> Data { get; } = data;
}
6 changes: 0 additions & 6 deletions src/Catalog.API/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@
"Version": "v1"
}
},
"ConnectionStrings": {
"EventBus": "amqp://localhost"
},
"EventBus": {
"SubscriptionClientName": "Catalog"
},
"CatalogOptions": {
"PicBasePathFormat": "items/{0}/pic/"
}
Expand Down
Loading