Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
com.akaver.sportmap
SportMap-ASPNET
Commits
6bc5e607
Commit
6bc5e607
authored
Aug 13, 2020
by
Andres Käver
Browse files
get track by id
parent
a4e8d95b
Pipeline
#843
passed with stages
in 2 minutes and 39 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
DAL.App.EF/Repositories/TrackRepository.cs
View file @
6bc5e607
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
...
...
@@ -34,5 +35,20 @@ namespace DAL.App.EF.Repositories
return
result
;
}
public
override
async
Task
<
Track
>
FirstOrDefaultAsync
(
Guid
id
,
object
?
userId
=
null
,
bool
noTracking
=
true
)
{
var
query
=
PrepareQuery
(
userId
,
noTracking
);
query
=
query
.
Include
(
l
=>
l
.
Name
)
.
ThenInclude
(
t
=>
t
!.
Translations
)
.
Include
(
l
=>
l
.
Description
)
.
ThenInclude
(
t
=>
t
!.
Translations
);
var
domainEntity
=
await
query
.
FirstOrDefaultAsync
(
e
=>
e
.
Id
.
Equals
(
id
));
var
result
=
Mapper
.
Map
(
domainEntity
);
return
result
;
}
}
}
\ 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