Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tsi1-backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rodrigo Sastre Marotta
tsi1-backend
Merge requests
!3
Feature/send message
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Feature/send message
feature/send-message
into
master
Overview
0
Commits
3
Pipelines
0
Changes
7
Merged
Feature/send message
Enzo Santangelo Dodera
requested to merge
feature/send-message
into
master
Oct 18, 2020
Overview
0
Commits
3
Pipelines
0
Changes
7
0
0
Merge request reports
Viewing commit
9fd19484
Prev
Next
Show latest version
7 files
+
118
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
7
9fd19484
add mongodb settings and message entity
· 9fd19484
esantangelo
authored
Oct 18, 2020
Tsi1.Api/Tsi1.Api/Startup.cs
+
9
−
0
View file @ 9fd19484
Edit in single-file editor
Open in Web IDE
Show full file
@@ -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