using EasyAbp.CacheManagement.CacheItems;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Modularity;

namespace EasyAbp.CacheManagement.EntityFrameworkCore
{
    [DependsOn(
        typeof(CacheManagementDomainModule),
        typeof(AbpEntityFrameworkCoreModule)
    )]
    public class CacheManagementEntityFrameworkCoreModule : AbpModule
    {
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            context.Services.AddAbpDbContext<CacheManagementDbContext>(options =>
            {
                /* Add custom repositories here. Example:
                 * options.AddRepository<Question, EfCoreQuestionRepository>();
                 */
                options.AddRepository<CacheItem, CacheItemRepository>();
            });
        }
    }
}
