GitXplorerGitXplorer
x

FunctionalAspire

public
0 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
a607a7587232d75a51ffaabb8d7c1581c9d327e3

Update to FuncDDD v 2.0.0-alpha.60

xxavierjohn committed a month ago
Unverified
deaf9ba4ab64ec3ce6828aad538e2a4368fa8cec

Show trace output

xxavierjohn committed 2 months ago
Unverified
c0e342d3a54af14c817a107983e0a41bd6e77d36

Update to .25

xxavierjohn committed 2 months ago
Unverified
4183e09a9006d9eae0faaa5e30f01e3dbc0ada7f

Sample Functional DDD and Service Level Indicator .NET Aspire program.

xxavierjohn committed 2 months ago
Verified
2be43998161dadb009ec3eb0243121a2020b2548

Initial commit

xxavierjohn committed 2 months ago

README

The README file for this repository.

FunctionalAspire

Functional .NET Aspire where Functional DDD and Service Level Indicators have been added.

Functional DDD

      userApi.MapPost("/register", (RegisterUserRequest request) =>
          FirstName.TryCreate(request.firstName)
          .Combine(LastName.TryCreate(request.lastName))
          .Combine(EmailAddress.TryCreate(request.email))
          .Bind((firstName, lastName, email) => User.TryCreate(firstName, lastName, email, request.password))
          .ToOkResult());

Service level Indicators

      RouteGroupBuilder userApi = app.MapGroup("/users")
        .AddServiceLevelIndicator();

Metric

Trace Okay

// Okay
POST {{HostAddress}}/users/register
Content-Type: application/json
Accept: application/json

{
  "firstName": "Xavier",
  "lastName": "John",
  "email": "xa@somewhere.com",
  "password": "KeepItSimple"
}
###

Trace Error

// Bad request
POST {{HostAddress}}/users/register
Content-Type: application/json
Accept: application/json

{
  "firstName": "string",
  "lastName": "",
  "email": "xa.com",
  "password": "string"
}
###