Refactor DependencyInjection and RepositoryConfiguration classes
Restructure code for improved readability and maintainability. Move RepositoryConfiguration as a nested public class inside DependencyInjection, group related service registration logic, and clarify method organization. No functional changes.
This commit is contained in:
@@ -11,14 +11,9 @@ using System.Linq;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace DigitalData.Core.Infrastructure
|
namespace DigitalData.Core.Infrastructure
|
||||||
#if NET
|
|
||||||
;
|
|
||||||
#elif NETFRAMEWORK
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public static class DependencyInjection
|
|
||||||
{
|
{
|
||||||
|
public static class DependencyInjection
|
||||||
|
{
|
||||||
public static IServiceCollection AddDbRepository(this IServiceCollection services, Action<RepositoryConfiguration> options)
|
public static IServiceCollection AddDbRepository(this IServiceCollection services, Action<RepositoryConfiguration> options)
|
||||||
{
|
{
|
||||||
// register services from configuration
|
// register services from configuration
|
||||||
@@ -145,8 +140,5 @@ public static class DependencyInjection
|
|||||||
services.AddSingleton(_ => new DbSetFactory<TDbContext, TEntity>(create));
|
services.AddSingleton(_ => new DbSetFactory<TDbContext, TEntity>(create));
|
||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#if NETFRAMEWORK
|
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
Reference in New Issue
Block a user