﻿using System.Reflection;
using Bmz.Framework.Modules;
using Bmz.Framework.MongoDb.Configuration;

namespace Bmz.Framework.MongoDb
{
    /// <summary>
    /// This module is used to implement "Data Access Layer" in MongoDB.
    /// </summary>
    [DependsOn(typeof(BmzKernelModule))]
    public class BmzMongoDbModule : BmzModule
    {
        public override void PreInitialize()
        {
            IocManager.Register<IBmzMongoDbModuleConfiguration, BmzMongoDbModuleConfiguration>();
        }

        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
        }
    }
}
