DAMA.Software.ValidateCourse 1.2.0

dotnet add package DAMA.Software.ValidateCourse --version 1.2.0
                    
NuGet\Install-Package DAMA.Software.ValidateCourse -Version 1.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DAMA.Software.ValidateCourse" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DAMA.Software.ValidateCourse" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="DAMA.Software.ValidateCourse" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DAMA.Software.ValidateCourse --version 1.2.0
                    
#r "nuget: DAMA.Software.ValidateCourse, 1.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DAMA.Software.ValidateCourse@1.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DAMA.Software.ValidateCourse&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=DAMA.Software.ValidateCourse&version=1.2.0
                    
Install as a Cake Tool

DAMA.Software.ValidateCourse

Shared gRPC contract for CourseManagement → ClassAttendance and CourseManagement → Payment communication in the DAMA microservices stack.

What it contains

Two Protobuf service definitions under Protos/:

  • class_existence.protoClassExistence.ScheduledExists(ScheduledExistsRequest) → ClassExistsResponse and ClassExistence.UniqueExists(UniqueExistsRequest) → ClassExistsResponse. Implemented by CourseManagementService; consumed by ClassAttendanceService to confirm a scheduled or unique class exists before recording attendance.
  • course_existence.protoCourseExistence.Exists(CourseExistsRequest) → CourseExistsResponse. Implemented by CourseManagementService; consumed by PaymentService to validate a CourseId when creating a DebtTemplate.

Grpc.Tools generates both the client and server stubs at build time (GrpcServices="Both"), so the same package serves both consumer and producer.

Usage

Add the package to a Backend.csproj:

<PackageReference Include="DAMA.Software.ValidateCourse" Version="1.0.0" />

Server side (CourseManagementService)

builder.Services.AddGrpc();
// ...
app.MapGrpcService<ClassExistenceGrpcService>();
app.MapGrpcService<CourseExistenceGrpcService>();

Where ClassExistenceGrpcService derives from ClassExistence.ClassExistenceBase and CourseExistenceGrpcService derives from CourseExistence.CourseExistenceBase.

Client side (e.g. ClassAttendanceService)

builder.Services.AddGrpcClient<ClassExistence.ClassExistenceClient>(o =>
    o.Address = new Uri(builder.Configuration["Services:CourseManagementUrl"]!))
    .AddInterceptor<JwtForwardClientInterceptor>();

The Authorization header is forwarded by an interceptor that lifts the bearer token off IHttpContextAccessor and writes it to the gRPC metadata under key authorization. The standard ASP.NET Core JwtBearer middleware on the server validates it without modification.

Client side (e.g. PaymentService)

builder.Services.AddGrpcClient<CourseExistence.CourseExistenceClient>(o =>
    o.Address = new Uri(builder.Configuration["Services:CourseManagementUrl"]!))
    .AddInterceptor<JwtForwardClientInterceptor>();

Wire format notes

  • Guid fields are serialized as canonical "D" strings, not bytes, for log readability.
  • DateOnly fields are serialized as "yyyy-MM-dd" strings.
  • Field tags are stable; never reuse a tag number after deletion — mark reserved instead.
  • New optional fields can be added without breaking existing clients as long as new tag numbers are used.

Generated namespace

DAMA.Software.ValidateCourse.Grpc
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 52 5/30/2026
1.1.0 167 5/13/2026
1.0.0 123 5/12/2026