AKlaus / DomainResult

Tiny package for decoupling domain operation results from IActionResult and IResult types of ASP.NET Web API
Apache License 2.0
53 stars 3 forks source link

Add support for typed results in minimal APIs of .NET 7 #53

Closed AKlaus closed 1 year ago

AKlaus commented 1 year ago

.NET 7 is adding typed results to the minimal APIs (announcement).

The following test would be possible:

    // Act
    var result = await TodosApi.GetAllTodos(db);

    // Assert: Check the returned result type is correct
    Assert.IsType<Ok<Todo[]>>(result);

Need to update the test cases for IResult of .NET 7 to check the type of IResult<T>