last ...
This commit is contained in:
@@ -0,0 +1,113 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using MongoDB.Bson.Serialization.Conventions;
|
||||
using xDataService.Configuration;
|
||||
using xDataService.Constants;
|
||||
using xDataService.Db;
|
||||
using xDataService.Models;
|
||||
|
||||
namespace xDataService.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Data Base Descriptor ...
|
||||
/// </summary>
|
||||
public interface IXDatabaseDescriptor
|
||||
{
|
||||
//
|
||||
#region Props ...
|
||||
/// <summary>
|
||||
/// Database Name ...
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Database Provider ...
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
XDbProviders Provider { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Db Context Type ...
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
Type Context { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Database Connecion String ...
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
string ConnectionString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Data Service Configuration ...
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
XDataBaseConfiguration Configuration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Repositories Descriptions ...
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
IList<XRepositoryDescriptor> Repositories { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Mongo Convention Packs ...
|
||||
/// </summary>
|
||||
ConventionPack ConventionPacks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// DbContext Options Builder ...
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
Action<dynamic> OptionsBuilder { get; set; }
|
||||
#endregion
|
||||
|
||||
//
|
||||
#region Configure ...
|
||||
/// <summary>
|
||||
/// Configure Database Descriptor using Registered Services ...
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
void Configure(
|
||||
IServiceCollection services
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Configure Database Descriptor using IConfiguration ...
|
||||
/// </summary>
|
||||
/// <param name="configuration"></param>
|
||||
void Configure(
|
||||
IConfiguration configuration
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Configure Database Descriptor using Database Configuration ...
|
||||
/// </summary>
|
||||
/// <param name="configuration"></param>
|
||||
void Configure(
|
||||
XDataBaseConfiguration configuration
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Configure Database Descriptor using Provider and Connection String ...
|
||||
/// </summary>
|
||||
/// <param name="provider"></param>
|
||||
/// <param name="connectionString"></param>
|
||||
void Configure(
|
||||
XDbProviders provider,
|
||||
string connectionString
|
||||
);
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Data Base Descriptor ...
|
||||
/// </summary>
|
||||
/// <typeparam name="TContext"></typeparam>
|
||||
public interface IXDatabaseDescriptor<TContext> : IXDatabaseDescriptor
|
||||
where TContext : XDbContext
|
||||
{ }
|
||||
}
|
||||
Reference in New Issue
Block a user