From b0293bf25ce38548b111fb828c359a46b0923a8b Mon Sep 17 00:00:00 2001 From: SamSys Date: Sat, 10 May 2025 16:30:55 +0330 Subject: [PATCH] =?UTF-8?q?DateSalary=20bug=20fix=20[=DA=A9=D9=85=DA=A9=20?= =?UTF-8?q?=D8=AF=D9=88=D9=84=D8=AA=20=D9=BE=D9=88=D8=B1=D8=B9=D9=84=DB=8C?= =?UTF-8?q?=20=D8=A7=D8=A8=D8=B1=201403]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CompanyManagment.EFCore/Repository/DateSalaryRepository.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CompanyManagment.EFCore/Repository/DateSalaryRepository.cs b/CompanyManagment.EFCore/Repository/DateSalaryRepository.cs index 90bdf7e0..28812bc7 100644 --- a/CompanyManagment.EFCore/Repository/DateSalaryRepository.cs +++ b/CompanyManagment.EFCore/Repository/DateSalaryRepository.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using _0_Framework.Application; using _0_Framework.InfraStructure; using Company.Domain.DateSalaryAgg; using Company.Domain.DateSalaryItemAgg; @@ -54,8 +55,8 @@ public class DateSalaryRepository : RepositoryBase, IDateSalar } public DateSalaryViewModel GetDateSalaryViewModel(DateSalarySearchModel searchModel) { - var query = _context.DateSalaries.Where(x =>x.StartDateGr >= searchModel.StartDateGr && searchModel.StartDateGr searchModel.EndDateGr && searchModel.EndDateGr <= x.EndDateGr).FirstOrDefault(); + + var query = _context.DateSalaries.FirstOrDefault(x => x.StartDateGr < searchModel.EndDateGr && x.EndDateGr > searchModel.StartDateGr); var dateSalary = new DateSalaryViewModel(); if (query != null) {