Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
payments
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Юнусов Ибрагим
payments
Commits
ea760aa5
Commit
ea760aa5
authored
Jul 06, 2022
by
Юнусов Ибрагим
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Вынес подключения в отдельный класс
parent
0f55c8e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
AppServicesExtension.cs
Payments/Payment.WebApi/Extensions/AppServicesExtension.cs
+17
-0
No files found.
Payments/Payment.WebApi/Extensions/AppServicesExtension.cs
0 → 100644
View file @
ea760aa5
using
Microsoft.EntityFrameworkCore
;
using
Payment.WebApi.Infrastructures.Databases
;
using
Payment.WebApi.Repositories
;
using
Payment.WebApi.Repositories.Interfaces
;
namespace
Payment.WebApi.Extensions
;
public
static
class
AppServicesExtension
{
public
static
void
AddAppServices
(
this
IServiceCollection
services
,
IConfiguration
configuration
)
{
services
.
AddDbContext
<
PaymentDbContext
>(
opt
=>
opt
.
UseNpgsql
(
configuration
.
GetConnectionString
(
"ConnectionString"
)));
services
.
AddScoped
<
IUserRepository
,
UserRepository
>();
services
.
AddScoped
<
ISupplierRepository
,
SupplierRepository
>();
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment