Buddha.NET 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Buddha.NET --version 1.0.0                
NuGet\Install-Package Buddha.NET -Version 1.0.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="Buddha.NET" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Buddha.NET --version 1.0.0                
#r "nuget: Buddha.NET, 1.0.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.
// Install Buddha.NET as a Cake Addin
#addin nuget:?package=Buddha.NET&version=1.0.0

// Install Buddha.NET as a Cake Tool
#tool nuget:?package=Buddha.NET&version=1.0.0                

Buddha.NET

The meditative Mediator framework for C# and ASP.NET Core

Structure

  • Buddha.NET/ - Main project (class library) containing the implementation
  • Buddha.NET.AspNetCore/ - Tools for using Buddha.NET with ASP.NET Core (currently only convenience, BuddhaController)
  • Buddha.NET.Demo/ - Demo ASP.NET Core Web API project implementing the Mediator pattern with Buddha.NET

Usage

As an example we will create a new ASP.NET Core Web API project (with .NET 5). If you want to see or get the full demo project immediately, look at the "Buddha.NET.Demo/" folder.

  1. Create a new C# project, add Buddha.NET (and Buddha.NET.AspNetCore if needed) as dependencies

  2. Remove the default files (in ASP.NET Core for example: "WeatherForecast.cs" and "WeatherForecastController.cs")

  3. Create Buddha.NET folder structure, we use the following as an example:

    • Model/ - Here are your entities.
    • Actions/ - Here you add the Mediator actions as sub-folders (eg. GetTodos) and inside them the Request, Response, Command and (if needed) Validator files.
    • Controllers/ - Here you add your Controllers.
    • Services/ - Here you add any needed services (for CRUD, DB operations, etc.)
  4. Create your first API endpoint (we use "/api/Todos/GetTodos" as an example)

    1. Add a new folder inside "Actions/" called "GetTodos"
    2. Inside "Actions/GetTodos/" add "GetTodosRequest.cs", "GetTodosResponse.cs", "GetTodosCommand.cs"
    3. Inside "Controllers/" add a new empty API controller called "TodosController.cs", let it inherit from "BuddhaController" (base class) and create an empty constructor

Under construction

Future

I will enhance this project further down the line (happy to get comments and issues posted).

Planned:

  • Publish as a package on NuGet
  • Write unit tests
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Buddha.NET:

Package Downloads
Buddha.NET.AspNetCore

ASP.NET Core tools and extensions for Buddha.NET

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 862 5/2/2022
1.0.1 988 4/27/2022
1.0.0 980 4/26/2022