using Microsoft.Extensions.DependencyInjection;
#if NETFRAMEWORK
using System;
#endif

namespace DigitalData.Core.Abstraction.Application.Repository
{
    public static class ServiceProviderExtensions
    {
        public static IRepository<TEntity> Repository<TEntity>(this IServiceProvider serviceProvider)
        {
            return serviceProvider.GetRequiredService<IRepository<TEntity>>();
        }
    }
}