Initial Commit ...
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
using System;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using MongoDB.Bson.Serialization.Conventions;
|
||||
using xDataService.Constants;
|
||||
|
||||
namespace xDataService.Interfaces {
|
||||
public interface IXDataServiceHelper {
|
||||
/// <summary>
|
||||
/// register DbContext implementation on DI Container ...
|
||||
/// Only Used in EFCore ...
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
/// <param name="connectionString"></param>
|
||||
/// <param name="dbProvider"></param>
|
||||
/// <param name="lifetime"></param>
|
||||
/// <param name="optionsBuilder"></param>
|
||||
void AddDbContext (
|
||||
IServiceCollection services,
|
||||
string connectionString,
|
||||
XDbProviders dbProvider,
|
||||
ServiceLifetime lifetime,
|
||||
Action<dynamic> optionsBuilder = null
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// register all Entities Repositories and Events on DI Container ...
|
||||
/// implementations of IXBaseRepository and IXBaseRepositoryEvent ...
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
/// <param name="lifetime"></param>
|
||||
void AddRepositories (
|
||||
IServiceCollection services,
|
||||
ServiceLifetime lifetime
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Regitster KeyGenerators for Repositories ...
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
void AddKeyGenerators (IServiceCollection services);
|
||||
|
||||
/// <summary>
|
||||
/// register DBSeeder Configuration on DI Container ...
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
/// <param name="configuration"></param>
|
||||
void AddDbSeederConfiguration (
|
||||
IServiceCollection services,
|
||||
IConfiguration configuration
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// register Data Seeder on DI Container ...
|
||||
/// implementation of IXDbSeeder ...
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
/// <param name="config"></param>
|
||||
/// <param name="lifetime"></param>
|
||||
/// <typeparam name="TDbSeeder"></typeparam>
|
||||
void AddDbSeeder<TDbSeeder> (
|
||||
IServiceCollection services,
|
||||
IConfiguration config,
|
||||
ServiceLifetime lifetime
|
||||
) where TDbSeeder : IXDbSeeder;
|
||||
|
||||
/// <summary>
|
||||
/// Set Mongo Convention Pack ...
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
ConventionPack MongoConventionPacks ();
|
||||
|
||||
/// <summary>
|
||||
/// Configure all required MongoDb Class Mappers and etc here ...
|
||||
/// </summary>
|
||||
void RegisterMongoExtras ();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user