using System; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using MongoDB.Bson.Serialization.Conventions; using xDataService.Constants; namespace xDataService.Interfaces { public interface IXDataServiceHelper { /// /// register DbContext implementation on DI Container ... /// Only Used in EFCore ... /// /// /// /// /// /// void AddDbContext ( IServiceCollection services, string connectionString, XDbProviders dbProvider, ServiceLifetime lifetime, Action optionsBuilder = null ); /// /// register all Entities Repositories and Events on DI Container ... /// implementations of IXBaseRepository and IXBaseRepositoryEvent ... /// /// /// void AddRepositories ( IServiceCollection services, ServiceLifetime lifetime ); /// /// Regitster KeyGenerators for Repositories ... /// /// void AddKeyGenerators (IServiceCollection services); /// /// register DBSeeder Configuration on DI Container ... /// /// /// void AddDbSeederConfiguration ( IServiceCollection services, IConfiguration configuration ); /// /// register Data Seeder on DI Container ... /// implementation of IXDbSeeder ... /// /// /// /// /// void AddDbSeeder ( IServiceCollection services, IConfiguration config, ServiceLifetime lifetime ) where TDbSeeder : IXDbSeeder; /// /// Set Mongo Convention Pack ... /// /// ConventionPack MongoConventionPacks (); /// /// Configure all required MongoDb Class Mappers and etc here ... /// void RegisterMongoExtras (); } }