Skip to content
Snippets Groups Projects

Feature/send message

7 files
+ 118
0
Compare changes
  • Side-by-side
  • Inline

Files

+ 9
0
@@ -14,6 +14,7 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Microsoft.IdentityModel.Tokens;
using Microsoft.OpenApi.Models;
using Tsi1.Api.Infrastructure;
@@ -21,6 +22,7 @@ using Tsi1.BusinessLayer.Helpers;
using Tsi1.BusinessLayer.Interfaces;
using Tsi1.BusinessLayer.Services;
using Tsi1.DataLayer;
using Tsi1.DataLayer.MongoDbConfiguration;
namespace Tsi1.Api
{
@@ -39,6 +41,13 @@ namespace Tsi1.Api
services.AddControllers();
services.AddDbContext<Tsi1Context>(x => x.UseNpgsql(Configuration.GetConnectionString("PostgreSql")));
services.Configure<ITsi1DatabaseSettings>(
Configuration.GetSection(nameof(Tsi1DatabaseSettings)));
services.AddSingleton<Tsi1DatabaseSettings>(sp =>
sp.GetRequiredService<IOptions<Tsi1DatabaseSettings>>().Value);
services.AddScoped<IUserService, UserService>();
services.AddScoped<IUserTypeService, UserTypeService>();
services.AddScoped<ICourseService, CourseService>();
Loading