Skip to content

Commit

Permalink
feat: Converting ShoppingCart to MinimalAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
EduardoPires committed Mar 31, 2022
1 parent d666b5f commit ca879b4
Show file tree
Hide file tree
Showing 16 changed files with 272 additions and 300 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
using DevStore.ShoppingCart.API.Data;
using DevStore.ShoppingCart.API.Services.gRPC;
using DevStore.ShoppingCart.API.Services.gRPC;
using DevStore.WebAPI.Core.Identity;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

namespace DevStore.ShoppingCart.API.Configuration
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Threading.Tasks;
using DevStore.ShoppingCart.API.Data;
using DevStore.WebAPI.Core.Configuration;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using DevStore.WebAPI.Core.Configuration;

namespace DevStore.ShoppingCart.API.Configuration
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using DevStore.ShoppingCart.API.Data;
using DevStore.WebAPI.Core.User;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using DevStore.WebAPI.Core.User;

namespace DevStore.ShoppingCart.API.Configuration
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using DevStore.Core.Utils;
using DevStore.MessageBus;
using DevStore.ShoppingCart.API.Services;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

namespace DevStore.ShoppingCart.API.Configuration
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.OpenApi.Models;
using System;
using Microsoft.OpenApi.Models;

namespace DevStore.ShoppingCart.API.Configuration
{
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using DevStore.ShoppingCart.API.Model;
using FluentValidation.Results;
using Microsoft.EntityFrameworkCore;
using System.Linq;

namespace DevStore.ShoppingCart.API.Data
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<UserSecretsId>14093821-325c-4620-86a1-2b4a9d955c4f</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>..\..\..</DockerfileContext>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>14093821-325c-4620-86a1-2b4a9d955c4f</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>..\..\..</DockerfileContext>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Grpc.AspNetCore" Version="2.39.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.11.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="5.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.9">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Grpc.AspNetCore" Version="2.44.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.15.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="6.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\building-blocks\DevStore.MessageBus\DevStore.MessageBus.csproj" />
<ProjectReference Include="..\..\building-blocks\DevStore.WebAPI.Core\DevStore.WebAPI.Core.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\building-blocks\DevStore.MessageBus\DevStore.MessageBus.csproj" />
<ProjectReference Include="..\..\building-blocks\DevStore.WebAPI.Core\DevStore.WebAPI.Core.csproj" />
</ItemGroup>


<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;

namespace DevStore.ShoppingCart.API.Migrations
{
Expand Down
1 change: 0 additions & 1 deletion src/services/DevStore.ShoppingCart.API/Model/CartItem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using FluentValidation;
using System;
using System.Text.Json.Serialization;

namespace DevStore.ShoppingCart.API.Model
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using FluentValidation;
using FluentValidation.Results;
using System;
using System.Collections.Generic;
using System.Linq;

namespace DevStore.ShoppingCart.API.Model
{
Expand Down
Loading

0 comments on commit ca879b4

Please sign in to comment.