Code Monkey home page Code Monkey logo

lsl.rebus.efcore.sqlserver's Introduction

Build status Coveralls NuGet

LSL.Rebus.EfCore.SqlServer

This package provides ModelBuilder extension methods to allow you to produce the tables expected by the Rebus.SqlServer package

NOTE: You will still need to create migrations to ensure the tables get created. Please see here for further details.

Sagas

To add the required entities to your DbContext then following should be added to OnModelCreating as below:

    using LSL.Rebus.EfCore.SqlServer;
    ...
    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        ...
        modelBuilder.AddRebusSagaTablesForSqlServer();
        ...
    }

The default values are held as constants in the TableNames static class as TableNames.Saga && TableNames.SagaIndex

The default table names are Sagas and SagaIndex. To use custom table names pass them into the call as below:

    using LSL.Rebus.EfCore.SqlServer;
    ...
    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        ...
        modelBuilder.AddRebusSagaTablesForSqlServer("CustomSagaTable", "CustomSagaIndexTable");
        ...
    }

Outbox

To add the required entities to your DbContext then following should be added to OnModelCreating as below:

    using LSL.Rebus.EfCore.SqlServer;
    ...
    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        ...
        modelBuilder.AddRebusOutboxTableForSqlServer();
        ...
    }

The default value is held as a constant in the TableNames static class as TableNames.Outbox

The default table name is Outbox. To use a custom table name pass the table name into the call as below:

    using LSL.Rebus.EfCore.SqlServer;
    ...
    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        ...
        modelBuilder.AddRebusOutboxTableForSqlServer("CustomOutboxTable");
        ...
    }

Timeouts

To add the required entities to your DbContext then following should be added to OnModelCreating as below:

    using LSL.Rebus.EfCore.SqlServer;
    ...
    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        ...
        modelBuilder.AddRebusTimeoutTableForSqlServer();
        ...
    }

The default value is held as a constant in the TableNames static class as TableNames.Timeouts

The default table name is Timeouts. To use a custom table name pass the table name into the call as below:

    using LSL.Rebus.EfCore.SqlServer;
    ...
    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        ...
        modelBuilder.AddRebusTimeoutTableForSqlServer("CustomTimeoutsTable");
        ...
    }

lsl.rebus.efcore.sqlserver's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.