Add profiles domain, infra, API endpoints
This commit is contained in:
20
RecNet.Infrastructure/DependencyInjection.cs
Normal file
20
RecNet.Infrastructure/DependencyInjection.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using RecNet.Domain.Repositories;
|
||||
using RecNet.Infrastructure.Persistence;
|
||||
using RecNet.Infrastructure.Persistence.Repositories;
|
||||
|
||||
namespace RecNet.Infrastructure;
|
||||
|
||||
public static class DependencyInjection
|
||||
{
|
||||
public static TBuilder AddInfrastructure<TBuilder>(this TBuilder builder)
|
||||
where TBuilder : IHostApplicationBuilder
|
||||
{
|
||||
builder.AddNpgsqlDbContext<DatabaseContext>("recnet");
|
||||
|
||||
builder.Services.AddScoped<IProfileRepository, ProfileRepository>();
|
||||
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user