15 lines
418 B
C#
15 lines
418 B
C#
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>>();
|
|
}
|
|
}
|
|
} |