Skip to content

Latest commit

 

History

History
166 lines (134 loc) · 6.36 KB

Readme.md

File metadata and controls

166 lines (134 loc) · 6.36 KB

GoldenEye

Stories in Ready Build status NuGet version

What is GoldenEye?

GoldenEye is a library that brings you abstractions and implementations for common topics. It is written in .NET Core. It provides set of base and bootstrap classes that helps you to reduce boilerplate code and help you focus on writing business code.

What do I get?

Complete DDD and CQRS helpers and bootstrap for:

Extension methods to make your life easier:

Lot of util classes

Built-in Modules handling

To make easier dependency resolution inside library package GoldenEye provides prossibility to define modules. Thanks for that you don't need to remember to register everything in runtime assembly. You can just AddModule and rest will be done automatically.

To define module you need to implement IModule interface.

public class CustomModule: IModule
{
    public virtual void Configure(IServiceCollection services)
    {
        services.AddScoped<SomeDbContext>();
    }

    public virtual void Use()
    {
        service.UseSomething();
    } 
}

or derive from Module class and override only what you need:

public class CustomModule: Module
{
    public override void Configure(IServiceCollection services)
    {
        services.AddScoped<SomeDbContext>();
    }
}

Then in your startup class call AddModule and UseModules extension methods:

    public class Startup
    {
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddModule<CustomModule>();
        }

        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            app.UseModules(env);
        }
    }

You can also add all of your defined modules by calling AddAllModules extension method:

    public class Startup
    {
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddAllModules();
        }

        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            app.UseModules(env);
        }
    }

How do I get started?

Create new project and add nuget package:

dotnet add package GoldenEye

You can either go and check Sample project, Install the project template by running

dotnet new -i GoldenEye.WebApi.Template.SimpleDDD

and then create new project based on it:

dotnet new SimpleDDD -n NameOfYourProject

Or manually add packages to your project, eg: create new project and add nuget package:

dotnet add package GoldenEye

You can also check my Github Tutorial about CQRS and Event Sourcing.

I found an issue or I have a change request

Feel free to create an issue on GitHub. Contributions, pull requests are more than welcome!

For detailed list of changes see Changelog

GoldenEye is Copyright © 2015-2020 Oskar Dudycz and other contributors under the MIT license.