Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Initial Project and Service added #388

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
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
88 changes: 83 additions & 5 deletions eSchool.sln
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,31 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebStatus", "src\Web\WebSta
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{74511F4E-FF9D-42C4-9531-A75C61270B73}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTelemetry", "src\Libraries\OpenTelemetry\OpenTelemetry.csproj", "{7B410F3B-36E0-4853-9B4E-41D0CC2865B5}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please skip adding your projects to the solution file? This way your project should not be visible in visual studio, but can be built from command line.

Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry", "src\Libraries\OpenTelemetry\OpenTelemetry.csproj", "{7B410F3B-36E0-4853-9B4E-41D0CC2865B5}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ApiGateways", "ApiGateways", "{256317ED-A2C8-48A0-9C6E-D6EB1F7D0BE0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eSchool.GraphQL", "src\ApiGateways\eSchool.GraphQL\eSchool.GraphQL.csproj", "{4053591A-1C1A-4A81-8496-F2FF7EAB2D5C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "eSchool.GraphQL", "src\ApiGateways\eSchool.GraphQL\eSchool.GraphQL.csproj", "{4053591A-1C1A-4A81-8496-F2FF7EAB2D5C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Frontend.Blazor", "Frontend.Blazor", "{0C00A596-0FE3-4FA6-B54B-FE2BE83371EF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frontend.Blazor.Client", "src\Web\Frontend.Blazor\Frontend.Blazor.Client\Frontend.Blazor.Client.csproj", "{53F4E6F9-6B91-45F9-97F9-F6EFA0EBEFCE}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Frontend.Blazor.Client", "src\Web\Frontend.Blazor\Frontend.Blazor.Client\Frontend.Blazor.Client.csproj", "{53F4E6F9-6B91-45F9-97F9-F6EFA0EBEFCE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frontend.Blazor.Server", "src\Web\Frontend.Blazor\Frontend.Blazor.Server\Frontend.Blazor.Server.csproj", "{3BABD4D9-56A1-4BA3-B30C-30E6765AB389}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Frontend.Blazor.Server", "src\Web\Frontend.Blazor\Frontend.Blazor.Server\Frontend.Blazor.Server.csproj", "{3BABD4D9-56A1-4BA3-B30C-30E6765AB389}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frontend.Blazor.Shared", "src\Web\Frontend.Blazor\Frontend.Blazor.Shared\Frontend.Blazor.Shared.csproj", "{4EB86635-CF79-4D15-909E-C41C98B0B586}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Frontend.Blazor.Shared", "src\Web\Frontend.Blazor\Frontend.Blazor.Shared\Frontend.Blazor.Shared.csproj", "{4EB86635-CF79-4D15-909E-C41C98B0B586}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Attending", "Attending", "{2BE71A01-0660-4264-B03F-8A386AB840ED}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Attending.API", "src\Services\Attendance\Attendance.API\Attending.API.csproj", "{2A2976A2-4578-49D1-BC3B-A9D466837CCB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Attending.Domain", "src\Services\Attendance\Attendance.Domain\Attending.Domain.csproj", "{69EAD5CE-01BD-4132-B65B-69EAC7DA10AF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Attending.FunctionalTests", "src\Services\Attendance\Attendance.FunctionalTests\Attending.FunctionalTests.csproj", "{020D0652-9802-431D-836A-B9ED27D841A2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Attending.Infrastructure", "src\Services\Attendance\Attendance.Infrastructure\Attending.Infrastructure.csproj", "{767C29FF-C92E-424D-84D4-FF606FACD07A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Attending.UnitTests", "src\Services\Attendance\Attendance.UnitTests\Attending.UnitTests.csproj", "{0D9BD20E-7EBC-4689-B621-676440441223}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -195,6 +207,66 @@ Global
{4EB86635-CF79-4D15-909E-C41C98B0B586}.Release|x64.Build.0 = Release|Any CPU
{4EB86635-CF79-4D15-909E-C41C98B0B586}.Release|x86.ActiveCfg = Release|Any CPU
{4EB86635-CF79-4D15-909E-C41C98B0B586}.Release|x86.Build.0 = Release|Any CPU
{2A2976A2-4578-49D1-BC3B-A9D466837CCB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A2976A2-4578-49D1-BC3B-A9D466837CCB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A2976A2-4578-49D1-BC3B-A9D466837CCB}.Debug|x64.ActiveCfg = Debug|Any CPU
{2A2976A2-4578-49D1-BC3B-A9D466837CCB}.Debug|x64.Build.0 = Debug|Any CPU
{2A2976A2-4578-49D1-BC3B-A9D466837CCB}.Debug|x86.ActiveCfg = Debug|Any CPU
{2A2976A2-4578-49D1-BC3B-A9D466837CCB}.Debug|x86.Build.0 = Debug|Any CPU
{2A2976A2-4578-49D1-BC3B-A9D466837CCB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2A2976A2-4578-49D1-BC3B-A9D466837CCB}.Release|Any CPU.Build.0 = Release|Any CPU
{2A2976A2-4578-49D1-BC3B-A9D466837CCB}.Release|x64.ActiveCfg = Release|Any CPU
{2A2976A2-4578-49D1-BC3B-A9D466837CCB}.Release|x64.Build.0 = Release|Any CPU
{2A2976A2-4578-49D1-BC3B-A9D466837CCB}.Release|x86.ActiveCfg = Release|Any CPU
{2A2976A2-4578-49D1-BC3B-A9D466837CCB}.Release|x86.Build.0 = Release|Any CPU
{69EAD5CE-01BD-4132-B65B-69EAC7DA10AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{69EAD5CE-01BD-4132-B65B-69EAC7DA10AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{69EAD5CE-01BD-4132-B65B-69EAC7DA10AF}.Debug|x64.ActiveCfg = Debug|Any CPU
{69EAD5CE-01BD-4132-B65B-69EAC7DA10AF}.Debug|x64.Build.0 = Debug|Any CPU
{69EAD5CE-01BD-4132-B65B-69EAC7DA10AF}.Debug|x86.ActiveCfg = Debug|Any CPU
{69EAD5CE-01BD-4132-B65B-69EAC7DA10AF}.Debug|x86.Build.0 = Debug|Any CPU
{69EAD5CE-01BD-4132-B65B-69EAC7DA10AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{69EAD5CE-01BD-4132-B65B-69EAC7DA10AF}.Release|Any CPU.Build.0 = Release|Any CPU
{69EAD5CE-01BD-4132-B65B-69EAC7DA10AF}.Release|x64.ActiveCfg = Release|Any CPU
{69EAD5CE-01BD-4132-B65B-69EAC7DA10AF}.Release|x64.Build.0 = Release|Any CPU
{69EAD5CE-01BD-4132-B65B-69EAC7DA10AF}.Release|x86.ActiveCfg = Release|Any CPU
{69EAD5CE-01BD-4132-B65B-69EAC7DA10AF}.Release|x86.Build.0 = Release|Any CPU
{020D0652-9802-431D-836A-B9ED27D841A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{020D0652-9802-431D-836A-B9ED27D841A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{020D0652-9802-431D-836A-B9ED27D841A2}.Debug|x64.ActiveCfg = Debug|Any CPU
{020D0652-9802-431D-836A-B9ED27D841A2}.Debug|x64.Build.0 = Debug|Any CPU
{020D0652-9802-431D-836A-B9ED27D841A2}.Debug|x86.ActiveCfg = Debug|Any CPU
{020D0652-9802-431D-836A-B9ED27D841A2}.Debug|x86.Build.0 = Debug|Any CPU
{020D0652-9802-431D-836A-B9ED27D841A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{020D0652-9802-431D-836A-B9ED27D841A2}.Release|Any CPU.Build.0 = Release|Any CPU
{020D0652-9802-431D-836A-B9ED27D841A2}.Release|x64.ActiveCfg = Release|Any CPU
{020D0652-9802-431D-836A-B9ED27D841A2}.Release|x64.Build.0 = Release|Any CPU
{020D0652-9802-431D-836A-B9ED27D841A2}.Release|x86.ActiveCfg = Release|Any CPU
{020D0652-9802-431D-836A-B9ED27D841A2}.Release|x86.Build.0 = Release|Any CPU
{767C29FF-C92E-424D-84D4-FF606FACD07A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{767C29FF-C92E-424D-84D4-FF606FACD07A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{767C29FF-C92E-424D-84D4-FF606FACD07A}.Debug|x64.ActiveCfg = Debug|Any CPU
{767C29FF-C92E-424D-84D4-FF606FACD07A}.Debug|x64.Build.0 = Debug|Any CPU
{767C29FF-C92E-424D-84D4-FF606FACD07A}.Debug|x86.ActiveCfg = Debug|Any CPU
{767C29FF-C92E-424D-84D4-FF606FACD07A}.Debug|x86.Build.0 = Debug|Any CPU
{767C29FF-C92E-424D-84D4-FF606FACD07A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{767C29FF-C92E-424D-84D4-FF606FACD07A}.Release|Any CPU.Build.0 = Release|Any CPU
{767C29FF-C92E-424D-84D4-FF606FACD07A}.Release|x64.ActiveCfg = Release|Any CPU
{767C29FF-C92E-424D-84D4-FF606FACD07A}.Release|x64.Build.0 = Release|Any CPU
{767C29FF-C92E-424D-84D4-FF606FACD07A}.Release|x86.ActiveCfg = Release|Any CPU
{767C29FF-C92E-424D-84D4-FF606FACD07A}.Release|x86.Build.0 = Release|Any CPU
{0D9BD20E-7EBC-4689-B621-676440441223}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0D9BD20E-7EBC-4689-B621-676440441223}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0D9BD20E-7EBC-4689-B621-676440441223}.Debug|x64.ActiveCfg = Debug|Any CPU
{0D9BD20E-7EBC-4689-B621-676440441223}.Debug|x64.Build.0 = Debug|Any CPU
{0D9BD20E-7EBC-4689-B621-676440441223}.Debug|x86.ActiveCfg = Debug|Any CPU
{0D9BD20E-7EBC-4689-B621-676440441223}.Debug|x86.Build.0 = Debug|Any CPU
{0D9BD20E-7EBC-4689-B621-676440441223}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0D9BD20E-7EBC-4689-B621-676440441223}.Release|Any CPU.Build.0 = Release|Any CPU
{0D9BD20E-7EBC-4689-B621-676440441223}.Release|x64.ActiveCfg = Release|Any CPU
{0D9BD20E-7EBC-4689-B621-676440441223}.Release|x64.Build.0 = Release|Any CPU
{0D9BD20E-7EBC-4689-B621-676440441223}.Release|x86.ActiveCfg = Release|Any CPU
{0D9BD20E-7EBC-4689-B621-676440441223}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -217,6 +289,12 @@ Global
{53F4E6F9-6B91-45F9-97F9-F6EFA0EBEFCE} = {0C00A596-0FE3-4FA6-B54B-FE2BE83371EF}
{3BABD4D9-56A1-4BA3-B30C-30E6765AB389} = {0C00A596-0FE3-4FA6-B54B-FE2BE83371EF}
{4EB86635-CF79-4D15-909E-C41C98B0B586} = {0C00A596-0FE3-4FA6-B54B-FE2BE83371EF}
{2BE71A01-0660-4264-B03F-8A386AB840ED} = {1C120673-72F4-4679-AC4C-68286E9091A5}
{2A2976A2-4578-49D1-BC3B-A9D466837CCB} = {2BE71A01-0660-4264-B03F-8A386AB840ED}
{69EAD5CE-01BD-4132-B65B-69EAC7DA10AF} = {2BE71A01-0660-4264-B03F-8A386AB840ED}
{020D0652-9802-431D-836A-B9ED27D841A2} = {2BE71A01-0660-4264-B03F-8A386AB840ED}
{767C29FF-C92E-424D-84D4-FF606FACD07A} = {2BE71A01-0660-4264-B03F-8A386AB840ED}
{0D9BD20E-7EBC-4689-B621-676440441223} = {2BE71A01-0660-4264-B03F-8A386AB840ED}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E418719F-3193-403E-AF58-9BE9F94FD8BE}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using System.Threading;
using System.Threading.Tasks;
using MediatR;
using Microsoft.Extensions.Logging;

namespace OpenCodeFoundation.ESchool.Services.Attending.API.Application.Behaviors
{
public class LoggingBehavior<TRequest, TResponse>
: IPipelineBehavior<TRequest, TResponse>
where TRequest : notnull
{
private readonly ILogger<LoggingBehavior<TRequest, TResponse>> _logger;

public LoggingBehavior(
ILogger<LoggingBehavior<TRequest, TResponse>> logger)
{
_logger = logger ?? throw new System.ArgumentNullException(nameof(logger));
}

public async Task<TResponse> Handle(
TRequest request,
CancellationToken cancellationToken,
RequestHandlerDelegate<TResponse> next)
{
if (next is null)
{
throw new System.ArgumentNullException(nameof(next));
}

_logger.LogInformation(
"Handling request {RequestName} ({@Request})",
request.GetType().Name,
request);

var response = await next().ConfigureAwait(false);

_logger.LogInformation(
"Request {RequestName} handled. Response: {@Response}",
request.GetType().Name,
response);

return response;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using MediatR;

namespace OpenCodeFoundation.ESchool.Services.Attending.API.Application.Commands
{
public record AttendanceApplicationCommand(
string StudentId,
string CourseId)
: IRequest<bool>;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using MediatR;
using Microsoft.Extensions.Logging;
using OpenCodeFoundation.ESchool.Services.Attending.Infrastructure;

namespace OpenCodeFoundation.ESchool.Services.Attending.API.Application.Commands
{
public sealed class AttendanceApplicationCommandHandler
: IRequestHandler<AttendanceApplicationCommand, bool>
{
private readonly ILogger<AttendanceApplicationCommandHandler> _logger;
private readonly AttendanceContext _context;

public AttendanceApplicationCommandHandler(
AttendanceContext context,
ILogger<AttendanceApplicationCommandHandler> logger)
{
_context = context ?? throw new ArgumentNullException(nameof(context));
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
}

public async Task<bool> Handle(
AttendanceApplicationCommand command,
CancellationToken cancellationToken)
{
if (command == null)
{
throw new ArgumentNullException(nameof(command));
}

var attendance = new Domain.AggregatesModel.AttendanceAggregate.Attendance(command.StudentId, command.CourseId);
await _context.Attendances.AddAsync(attendance, cancellationToken)
.ConfigureAwait(false);
await _context.SaveChangesAsync(cancellationToken)
.ConfigureAwait(false);
return true;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using FluentValidation;
using OpenCodeFoundation.ESchool.Services.Attending.API.Application.Commands;

namespace OpenCodeFoundation.ESchool.Services.Attending.API.Application.Validations
{
public class AttendanceApplicationCommandValidator
: AbstractValidator<AttendanceApplicationCommand>
{
public AttendanceApplicationCommandValidator()
{
RuleFor(application => application.CourseId).NotEmpty();
RuleFor(application => application.StudentId).NotEmpty();
}
}
}
43 changes: 43 additions & 0 deletions src/Services/Attendance/Attendance.API/Attending.API.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<AssemblyName>Attendance.API</AssemblyName>
<RootNamespace>OpenCodeFoundation.ESchool.Services.Attending.API</RootNamespace>
</PropertyGroup>
<ItemGroup>
<!-- HealthChecks -->
<PackageReference Include="AspNetCore.HealthChecks.SqlServer" Version="5.0.2" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="5.0.1" />
<PackageReference Include="HotChocolate.AspNetCore" Version="11.1.0" />
<PackageReference Include="HotChocolate.Stitching" Version="11.1.0" />
<!-- In-memory commandbus -->
<PackageReference Include="MediatR" Version="9.0.0" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="9.0.0" />
<!-- For validating inputs -->
<PackageReference Include="FluentValidation.AspNetCore" Version="10.0.2" />
<!-- Polly is a .NET resilience and transient-fault-handling library that
allows developers to express policies such as Retry, Circuit Breaker, Timeout,
Bulkhead Isolation, and Fallback in a fluent and thread-safe manner. -->
<PackageReference Include="Polly" Version="7.2.1" />
<!-- Logging -->
<PackageReference Include="Serilog.AspNetCore" Version="4.1.0" />
<PackageReference Include="Serilog.Enrichers.Span" Version="1.2.0" />
<PackageReference Include="Serilog.Sinks.Seq" Version="5.0.0" />
<!-- Swagger -->
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.1.2" />
<!-- Need this package for generating migration files -->
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Libraries\OpenTelemetry\OpenTelemetry.csproj" />
<ProjectReference Include="..\Attendance.Domain\Attending.Domain.csproj" />
<ProjectReference Include="..\Attendance.Infrastructure\Attending.Infrastructure.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Application\Validations\" />
<Folder Include="Controllers\" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using MediatR;
using Microsoft.AspNetCore.Mvc;
using OpenCodeFoundation.ESchool.Services.Attending.API.Application.Commands;

namespace OpenCodeFoundation.ESchool.Services.Attending.API.Controllers
{
[ApiController]
[Route("[controller]")]
public class AttendancesController : ControllerBase
{
private readonly IMediator _mediator;

public AttendancesController(IMediator mediator)
{
_mediator = mediator ?? throw new ArgumentNullException(nameof(mediator));
}

[HttpPost]
public async Task<IActionResult> Post(
[FromBody] AttendanceApplicationCommand command,
CancellationToken cancellationToken)
{
await _mediator.Send(command, cancellationToken)
.ConfigureAwait(false);
return Ok();
}
}
}
46 changes: 46 additions & 0 deletions src/Services/Attendance/Attendance.API/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim AS base
WORKDIR /app
EXPOSE 80

FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build
WORKDIR /src

COPY "eSchool.sln" "eSchool.sln"

COPY "src/ApiGateways/eSchool.GraphQL/eSchool.GraphQL.csproj" "src/ApiGateways/eSchool.GraphQL/eSchool.GraphQL.csproj"

COPY "src/Services/Attending/Attending.API/Attending.API.csproj" "src/Services/Attending/Attending.API/Attending.API.csproj"
COPY "src/Services/Attending/Attending.Domain/Attending.Domain.csproj" "src/Services/Attending/Attending.Domain/Attending.Domain.csproj"
COPY "src/Services/Attending/Attending.Infrastructure/Attending.Infrastructure.csproj" "src/Services/Attending/Attending.Infrastructure/Attending.Infrastructure.csproj"
COPY "src/Services/Attending/Attending.UnitTests/Attending.UnitTests.csproj" "src/Services/Attending/Attending.UnitTests/Attending.UnitTests.csproj"
COPY "src/Services/Attending/Attending.FunctionalTests/Attending.FunctionalTests.csproj" "src/Services/Attending/Attending.FunctionalTests/Attending.FunctionalTests.csproj"

COPY "src/Libraries/OpenTelemetry/OpenTelemetry.csproj" "src/Libraries/OpenTelemetry/OpenTelemetry.csproj"

COPY "src/Web/WebStatus/WebStatus.csproj" "src/Web/WebStatus/WebStatus.csproj"

COPY "src/Web/Frontend.Blazor/Frontend.Blazor.Server/Frontend.Blazor.Server.csproj" "src/Web/Frontend.Blazor/Frontend.Blazor.Server/Frontend.Blazor.Server.csproj"
COPY "src/Web/Frontend.Blazor/Frontend.Blazor.Client/Frontend.Blazor.Client.csproj" "src/Web/Frontend.Blazor/Frontend.Blazor.Client/Frontend.Blazor.Client.csproj"
COPY "src/Web/Frontend.Blazor/Frontend.Blazor.Shared/Frontend.Blazor.Shared.csproj" "src/Web/Frontend.Blazor/Frontend.Blazor.Shared/Frontend.Blazor.Shared.csproj"

COPY "docker-compose.dcproj" "docker-compose.dcproj"

RUN dotnet restore eSchool.sln -nowarn:msb3202,nu1503

COPY . .
WORKDIR /src/src/Services/Attending/Attending.API
RUN dotnet build --no-restore -c Release -o /app/build

FROM build as unittest
WORKDIR /src/src/Services/Attending/Attending.UnitTests

FROM build as functionaltest
WORKDIR /src/src/Services/Attending/Attending.FunctionalTests

FROM build AS publish
RUN dotnet publish --no-restore -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Attending.API.dll"]
Loading