22 lines
769 B
C#
22 lines
769 B
C#
using Autofac;
|
|
using e_suite.Database.Core;
|
|
using e_suite.Database.SqlServer;
|
|
using eSuite.Core.Clock;
|
|
|
|
namespace eSuite.API.DependencyInjection;
|
|
|
|
/// <summary>
|
|
/// Used as a the primary location for IOC type registration for e-suite.
|
|
/// </summary>
|
|
internal class CoreRegistrationModule : Module
|
|
{
|
|
/// <summary>
|
|
/// Use the builder to register all the types and interfaces that the API requires to operate properly.
|
|
/// </summary>
|
|
/// <param name="builder"></param>
|
|
protected override void Load(ContainerBuilder builder)
|
|
{
|
|
builder.RegisterType<SqlEsuiteDatabaseDbContext>().As<IEsuiteDatabaseDbContext>().InstancePerLifetimeScope();
|
|
builder.RegisterType<UtcClock>().As<IClock>().SingleInstance();
|
|
}
|
|
} |