using Microsoft.Extensions.DependencyInjection;
using System;
namespace EntityFrameworkBasics
{
///
/// A shorthand access class to get DI services with nice clean short code
///
public static class IoC
{
///
/// The scoped instance of the
///
public static ApplicationDbContext ApplicationDbContext => IoCContainer.Provider.GetService();
}
///
/// The dependency injection container making use of the built in .Net Core service provider
///
public static class IoCContainer
{
///
/// The service provider for this application
///
public static ServiceProvider Provider { get; set; }
}
}