Skip to content

Commit ac1a8b1

Browse files
author
Leonid
committed
Fix ef query
1 parent c8b1eb3 commit ac1a8b1

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

eFormAPI/eFormAPI.Web/Services/EformReportsService.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -267,17 +267,7 @@ public async Task<OperationDataResult<EformReportFullModel>> GetEformReport(int
267267
}
268268

269269
var eformReport = await _dbContext.EformReports
270-
.Where(x => x.TemplateId == templateId)
271-
.Select(x => new EformReport()
272-
{
273-
Id = x.Id,
274-
TemplateId = x.TemplateId,
275-
Description = x.Description,
276-
// HeaderImage = x.HeaderImage == null ? string.Empty : Encoding.UTF8.GetString(x.HeaderImage),
277-
HeaderVisibility = x.HeaderVisibility,
278-
IsDateVisible = x.IsDateVisible,
279-
IsWorkerNameVisible = x.IsWorkerNameVisible,
280-
}).FirstOrDefaultAsync();
270+
.FirstOrDefaultAsync(x => x.TemplateId == templateId)
281271

282272
if (eformReport == null)
283273
{

0 commit comments

Comments
 (0)