Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
ProjectsStatusManagement
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
hasan.bahjat
ProjectsStatusManagement
Commits
104902f3
Commit
104902f3
authored
Jul 16, 2024
by
hasan khaddour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor.
parent
5fd9fdbd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
ISpecification.cs
PSManagement.SharedKernel/Interfaces/ISpecification.cs
+1
-1
IRepository.cs
PSManagement.SharedKernel/Repositories/IRepository.cs
+4
-4
BaseSpecification.cs
PSManagement.SharedKernel/Specification/BaseSpecification.cs
+2
-2
No files found.
PSManagement.SharedKernel/Interfaces/ISpecification.cs
View file @
104902f3
...
...
@@ -14,7 +14,7 @@ namespace PSManagement.SharedKernel.Interfaces
int
Take
{
get
;
}
int
Skip
{
get
;
}
bool
i
sPagingEnabled
{
get
;
}
bool
I
sPagingEnabled
{
get
;
}
}
}
PSManagement.SharedKernel/Repositories/IRepository.cs
View file @
104902f3
...
...
@@ -7,11 +7,11 @@ namespace PSManagement.SharedKernel.Repositories
{
public
interface
IRepository
<
T
>
where
T
:
BaseEntity
{
Task
<
T
>
GetByIdAsync
(
int
id
);
Task
<
List
<
T
>>
ListAsync
();
Task
<
List
<
T
>>
ListAsync
(
ISpecification
<
T
>
spec
);
Task
<
T
>
GetByIdAsync
(
int
id
,
ISpecification
<
T
>
specification
=
null
);
Task
<
IEnumerable
<
T
>>
ListAsync
();
Task
<
IEnumerable
<
T
>>
ListAsync
(
ISpecification
<
T
>
specification
);
Task
<
T
>
AddAsync
(
T
entity
);
Task
UpdateAsync
(
T
entity
);
Task
<
T
>
UpdateAsync
(
T
entity
);
Task
DeleteAsync
(
T
entity
);
}
}
PSManagement.SharedKernel/Specification/BaseSpecification.cs
View file @
104902f3
...
...
@@ -21,7 +21,7 @@ namespace PSManagement.SharedKernel.Specification
public
int
Take
{
get
;
private
set
;
}
public
int
Skip
{
get
;
private
set
;
}
public
bool
i
sPagingEnabled
{
get
;
private
set
;
}
=
false
;
public
bool
I
sPagingEnabled
{
get
;
private
set
;
}
=
false
;
protected
virtual
void
AddInclude
(
Expression
<
Func
<
T
,
object
>>
includeExpression
)
{
...
...
@@ -35,7 +35,7 @@ namespace PSManagement.SharedKernel.Specification
{
Skip
=
skip
;
Take
=
take
;
i
sPagingEnabled
=
true
;
I
sPagingEnabled
=
true
;
}
protected
virtual
void
ApplyOrderBy
(
Expression
<
Func
<
T
,
object
>>
orderByExpression
)
{
...
...
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