Add project files.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.4" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.4" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.4">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AccountManagement.Application.Contracts\AccountManagement.Application.Contracts.csproj" />
|
||||
<ProjectReference Include="..\AccountManagement.Application\AccountManagement.Application.csproj" />
|
||||
<ProjectReference Include="..\AccountMangement.Infrastructure.EFCore\AccountMangement.Infrastructure.EFCore.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,61 @@
|
||||
using AccountManagement.Application;
|
||||
using AccountManagement.Application.Contracts.Account;
|
||||
using AccountManagement.Application.Contracts.CameraAccount;
|
||||
using AccountManagement.Application.Contracts.Role;
|
||||
using AccountManagement.Application.Contracts.Task;
|
||||
using AccountManagement.Application.Contracts.TaskSubject;
|
||||
using AccountManagement.Domain.AccountAgg;
|
||||
using AccountManagement.Domain.AssignAgg;
|
||||
using AccountManagement.Domain.CameraAccountAgg;
|
||||
using AccountManagement.Domain.MediaAgg;
|
||||
using AccountManagement.Domain.RoleAgg;
|
||||
using AccountManagement.Domain.TaskAgg;
|
||||
using AccountManagement.Domain.TaskSubjectAgg;
|
||||
using AccountMangement.Infrastructure.EFCore;
|
||||
using AccountMangement.Infrastructure.EFCore.Repository;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using TaskManager.Application.Contract.Position;
|
||||
using TaskManager.Application;
|
||||
using TaskManager.Domain.PositionAgg;
|
||||
using TaskManager.Infrastructure.EFCore.Repository;
|
||||
|
||||
namespace AccountManagement.Configuration
|
||||
{
|
||||
public class AccountManagementBootstrapper
|
||||
{
|
||||
public static void Configure(IServiceCollection services, string connectionString)
|
||||
{
|
||||
services.AddTransient<IAccountApplication, AccountApplication>();
|
||||
services.AddTransient<IAccountRepository, AccountRepository>();
|
||||
|
||||
services.AddTransient<IRoleApplication, RoleApplication>();
|
||||
services.AddTransient<IRoleRepository, RoleRepository>();
|
||||
|
||||
services.AddTransient<ICameraAccountApplication, CameraAccountApplication>();
|
||||
services.AddTransient<ICameraAccountRepository, CameraAccountRepository>();
|
||||
|
||||
#region Mahan
|
||||
|
||||
services.AddTransient<IPositionRepository, PositionRepository>();
|
||||
services.AddTransient<IPositionApplication, PositionApplication>();
|
||||
|
||||
services.AddTransient<ITaskApplication, TaskApplication>();
|
||||
services.AddTransient<ITaskRepository, TaskRepository>();
|
||||
|
||||
services.AddTransient<ITaskSubjectRepository, TaskSubjectRepository>();
|
||||
services.AddTransient<ITaskSubjectApplication, TaskSubjectApplication>();
|
||||
|
||||
services.AddTransient<IAssignRepository, AssignRepository>();
|
||||
|
||||
services.AddTransient<IMediaRepository, MediaRepository>();
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
services.AddScoped<IWorker, Worker>();
|
||||
services.AddDbContext<AccountContext>(x => x.UseSqlServer(connectionString));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user