diff --git a/DigitalData.Core.Abstraction.Application/Repository/ServiceProviderExtensions.cs b/DigitalData.Core.Abstraction.Application/Repository/ServiceProviderExtensions.cs new file mode 100644 index 0000000..39e7938 --- /dev/null +++ b/DigitalData.Core.Abstraction.Application/Repository/ServiceProviderExtensions.cs @@ -0,0 +1,15 @@ +using Microsoft.Extensions.DependencyInjection; +#if NETFRAMEWORK +using System; +#endif + +namespace DigitalData.Core.Abstraction.Application.Repository +{ + public static class ServiceProviderExtensions + { + public static IRepository Repository(this IServiceProvider serviceProvider) + { + return serviceProvider.GetRequiredService>(); + } + } +} \ No newline at end of file