dotnet version change, readme, script for ef
This commit is contained in:
@@ -13,18 +13,22 @@
|
|||||||
<PackageVersion Include="FluentValidation.AspNetCore" Version="11.3.0" />
|
<PackageVersion Include="FluentValidation.AspNetCore" Version="11.3.0" />
|
||||||
<PackageVersion Include="FluentValidation.DependencyInjectionExtensions" Version="11.8.1" />
|
<PackageVersion Include="FluentValidation.DependencyInjectionExtensions" Version="11.8.1" />
|
||||||
<PackageVersion Include="MediatR" Version="12.2.0" />
|
<PackageVersion Include="MediatR" Version="12.2.0" />
|
||||||
<PackageVersion Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.0" />
|
<PackageVersion Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.3" />
|
||||||
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.0" />
|
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.3" />
|
||||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0" />
|
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.3" />
|
||||||
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="8.0.0" />
|
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="8.0.3" />
|
||||||
<PackageVersion Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.0" />
|
<PackageVersion Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.3" />
|
||||||
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
|
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="8.0.3" />
|
||||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.0" />
|
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.3">
|
||||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" />
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.0" />
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
|
</PackageVersion>
|
||||||
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
|
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.3" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="8.0.0" />
|
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.3" />
|
||||||
|
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.3" />
|
||||||
|
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.3" />
|
||||||
|
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.3" />
|
||||||
|
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="8.0.3" />
|
||||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
|
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
|
||||||
<PackageVersion Include="Moq" Version="4.20.69" />
|
<PackageVersion Include="Moq" Version="4.20.69" />
|
||||||
<PackageVersion Include="NSwag.AspNetCore" Version="14.0.3" />
|
<PackageVersion Include="NSwag.AspNetCore" Version="14.0.3" />
|
||||||
|
|||||||
1
Ef.ps1
Normal file
1
Ef.ps1
Normal file
@@ -0,0 +1 @@
|
|||||||
|
dotnet ef $args --startup-project ./src/Web/Web.csproj --project ./src/Infrastructure/Infrastructure.csproj
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
# Hutopy
|
# Hutopy
|
||||||
|
|
||||||
## Pattern used
|
## Patterns / strategy used
|
||||||
- Clean Architecture
|
- Clean Architecture ( with Infrastructure, Domain, Application and Web layers )
|
||||||
|
- Minimal API endpoints.
|
||||||
- Guards ( Fail fast ) : https://github.com/ardalis/GuardClauses
|
- Guards ( Fail fast ) : https://github.com/ardalis/GuardClauses
|
||||||
|
-
|
||||||
|
|
||||||
## Tools
|
## Tools
|
||||||
- Install Docker : https://www.docker.com/get-started/
|
- Install Docker : https://www.docker.com/get-started/
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"sdk": {
|
"sdk": {
|
||||||
"version": "8.0.100",
|
"version": "8.0.300",
|
||||||
"rollForward": "latestFeature"
|
"rollForward": "latestFeature"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -28,7 +28,6 @@ public static class DependencyInjection
|
|||||||
services.AddDbContext<ApplicationDbContext>((sp, options) =>
|
services.AddDbContext<ApplicationDbContext>((sp, options) =>
|
||||||
{
|
{
|
||||||
options.AddInterceptors(sp.GetServices<ISaveChangesInterceptor>());
|
options.AddInterceptors(sp.GetServices<ISaveChangesInterceptor>());
|
||||||
|
|
||||||
options.UseSqlServer(connectionString);
|
options.UseSqlServer(connectionString);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -41,6 +40,7 @@ public static class DependencyInjection
|
|||||||
|
|
||||||
services.AddAuthorizationBuilder();
|
services.AddAuthorizationBuilder();
|
||||||
|
|
||||||
|
// Might need to change and use AddIdentity<User, Role>() when we need to integrate connection via third party ( facebook, google )
|
||||||
services
|
services
|
||||||
.AddIdentityCore<ApplicationUser>()
|
.AddIdentityCore<ApplicationUser>()
|
||||||
.AddRoles<IdentityRole>()
|
.AddRoles<IdentityRole>()
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<RootNamespace>Hutopy.Infrastructure</RootNamespace>
|
<RootNamespace>Hutopy.Infrastructure</RootNamespace>
|
||||||
<AssemblyName>Hutopy.Infrastructure</AssemblyName>
|
<AssemblyName>Hutopy.Infrastructure</AssemblyName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" />
|
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore"/>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore"/>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design">
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" />
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" />
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer"/>
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational"/>
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Application\Application.csproj" />
|
<ProjectReference Include="..\Application\Application.csproj"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
12
src/Web/.config/dotnet-tools.json
Normal file
12
src/Web/.config/dotnet-tools.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"isRoot": true,
|
||||||
|
"tools": {
|
||||||
|
"dotnet-ef": {
|
||||||
|
"version": "8.0.3",
|
||||||
|
"commands": [
|
||||||
|
"dotnet-ef"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user