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
7d58cb25
Commit
7d58cb25
authored
Jul 27, 2022
by
Юнусов Ибрагим
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Добавил lazyLoading
parent
daab1daa
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
3 deletions
+9
-3
UserController.cs
Payments/Payment.WebApi/Controllers/UserController.cs
+1
-1
PaymentDbContext.cs
...ment.WebApi/Infrastructures/Databases/PaymentDbContext.cs
+5
-0
User.cs
Payments/Payment.WebApi/Models/DbModels/User.cs
+1
-1
UserBalance.cs
Payments/Payment.WebApi/Models/DbModels/UserBalance.cs
+1
-1
Payment.WebApi.csproj
Payments/Payment.WebApi/Payment.WebApi.csproj
+1
-0
No files found.
Payments/Payment.WebApi/Controllers/UserController.cs
View file @
7d58cb25
...
...
@@ -9,7 +9,7 @@ namespace Payment.WebApi.Controllers;
[ApiController]
[Route("Users/[action]
")]
[Produces("application
s
/json")]
[Produces("application/json")]
public
class
UserController
:
Controller
{
private
readonly
IUserRepository
_userRepository
;
...
...
Payments/Payment.WebApi/Infrastructures/Databases/PaymentDbContext.cs
View file @
7d58cb25
...
...
@@ -12,6 +12,11 @@ public class PaymentDbContext : DbContext
{
}
protected
override
void
OnConfiguring
(
DbContextOptionsBuilder
optionsBuilder
)
{
optionsBuilder
.
UseLazyLoadingProxies
();
}
protected
override
void
OnModelCreating
(
ModelBuilder
modelBuilder
)
{
base
.
OnModelCreating
(
modelBuilder
);
...
...
Payments/Payment.WebApi/Models/DbModels/User.cs
View file @
7d58cb25
...
...
@@ -8,7 +8,7 @@ public class User
public
string
?
MiddleName
{
get
;
set
;
}
public
string
Email
{
get
;
set
;
}
public
int
Age
{
get
;
set
;
}
public
List
<
UserBalance
>
Balances
{
get
;
set
;
}
public
virtual
List
<
UserBalance
>
Balances
{
get
;
set
;
}
public
bool
IsActive
{
get
;
set
;
}
public
User
()
...
...
Payments/Payment.WebApi/Models/DbModels/UserBalance.cs
View file @
7d58cb25
...
...
@@ -6,5 +6,5 @@ public class UserBalance
public
decimal
Amount
{
get
;
set
;
}
public
string
Currency
{
get
;
set
;
}
public
int
UserId
{
get
;
set
;
}
public
User
User
{
get
;
set
;
}
public
virtual
User
User
{
get
;
set
;
}
}
\ No newline at end of file
Payments/Payment.WebApi/Payment.WebApi.csproj
View file @
7d58cb25
...
...
@@ -11,6 +11,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="6.0.7" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.5" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.4.0" />
...
...
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