-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProgram.cs
More file actions
37 lines (33 loc) · 1.46 KB
/
Program.cs
File metadata and controls
37 lines (33 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using File_Acess_Management.Data;
using File_Acess_Management.Data.Repository;
using File_Acess_Management.Data.Repository.IRepository;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Windows.Forms;
namespace File_Acess_Management
{
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
var services = new ServiceCollection();
services.AddSingleton<IDatabaseConnectionProvider, ConnectionHelper>();
services.AddSingleton<ICommandFactory, ConnectionHelper>();
services.AddScoped<ISoftwareRepository, SoftwareRepository>();
services.AddScoped<IUserManagementRepository, UserManagementRepository>();
services.AddScoped<IUserManagerAssignmentRepository, UserManagerAssignmentRepository>();
services.AddScoped<IUserRaisedRequestRepository, UserRaisedRequestRepository>();
services.AddScoped<IAdminRaisedRequest, AdminRaisedRequest>();
services.AddScoped<IManagerSideRepository, ManagerSideRepository>();
ServiceProvider serviceProvider = services.BuildServiceProvider();
Application.Run(new UserLogin(serviceProvider));
//Application.Run();
}
}
}