46 lines
1.3 KiB
C#
46 lines
1.3 KiB
C#
|
|
using StudentProgressRecord.IRepositories;
|
|
using StudentProgressRecord.Repositories;
|
|
using StudentProgressRecord.RepositoryImp;
|
|
using Unity;
|
|
using Unity.Lifetime;
|
|
|
|
namespace StudentProgressRecord
|
|
{
|
|
internal static class Program
|
|
{
|
|
/// <summary>
|
|
/// The main entry point for the application.
|
|
/// </summary>
|
|
[STAThread]
|
|
static void Main()
|
|
{
|
|
ApplicationConfiguration.Initialize();
|
|
Application.Run(new University());
|
|
}
|
|
|
|
private static IUnityContainer CreateContainer()
|
|
{
|
|
var container = new UnityContainer();
|
|
|
|
|
|
container.RegisterType<IStatementRepository, StatementRepository>
|
|
(new TransientLifetimeManager());
|
|
|
|
container.RegisterType<IStudentRepository, StudentRepository>
|
|
(new TransientLifetimeManager());
|
|
|
|
container.RegisterType<ISubjectRepository, SubjectRepository>
|
|
(new TransientLifetimeManager());
|
|
|
|
container.RegisterType<ITeacherRepository, TeacherRepository>
|
|
(new TransientLifetimeManager());
|
|
|
|
container.RegisterType<IStudentTransitionRepository, StudentTransitionRepository>
|
|
(new TransientLifetimeManager());
|
|
|
|
return container;
|
|
}
|
|
|
|
}
|
|
} |