Skip to content

Handling Exceptions and nulls with LanguageExt

Notifications You must be signed in to change notification settings

rmbrunet/Functoso

Repository files navigation

Functoso

Using LanguageExt to handle Exceptions and nulls in ASP.NET Core web API

Nuget Packages

Data served from {JSON} Placeholder. The Users endpoint returns 10 users. The User/{id} endpoint returns users 1-10 or NotFound.

Commonly, we model the interaction with the world outside the application with Task<T>; things that go in the external (Infrastructure) zone of a Clean Architecture desing pattern, SQL Connections, HttpClients, File IO. But Task<T> is a poor representation of an interaction that can get messy very soon, leaving to the developers to handle nulls, exceptions, etc. Aff<T> from LanguageExt offers an alternative with richier error handling capabilities. The current project is a minimalistic sample of it use.

Reference: How to deal with side effects

About

Handling Exceptions and nulls with LanguageExt

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages