Я пытался смоделировать ваш сценарий с помощью List.
var tablePricePerHours = new List<TablePricePerHours>
{
new TablePricePerHours{ Price = 10, Tax = 19, Date = new DateTime(2018,1,5)},
new TablePricePerHours{ Price = 10.5, Tax = 21.5, Date = new DateTime(2018,4,22)},
new TablePricePerHours{ Price = 11, Tax = 22.5, Date = new DateTime(2018,6,19)},
new TablePricePerHours{ Price = 11.5, Tax = 23, Date = new DateTime(2018,10,30)},
new TablePricePerHours{ Price = 12, Tax = 23.2, Date = new DateTime(2018,11,1)}
};
var tableTotalHours = new List<TableTotalHours>
{
new TableTotalHours{ Date = new DateTime(2018,02,15), TotalHours = 5},
new TableTotalHours{ Date = new DateTime(2018,02,19), TotalHours =10},
new TableTotalHours{ Date = new DateTime(2018,02,25), TotalHours = 8},
new TableTotalHours{ Date = new DateTime(2018,03,29), TotalHours = 7.5},
new TableTotalHours{ Date = new DateTime(2018,07,05), TotalHours = 9},
new TableTotalHours{ Date = new DateTime(2018,07,06), TotalHours = 1.5},
new TableTotalHours{ Date = new DateTime(2018,07,07), TotalHours = 12},
new TableTotalHours{ Date = new DateTime(2018,10,22), TotalHours = 10},
new TableTotalHours{ Date = new DateTime(2018,10,22), TotalHours = 10},
new TableTotalHours{ Date = new DateTime(2018,11,1), TotalHours = 8},
new TableTotalHours{ Date = new DateTime(2018,12,21), TotalHours = 8.5},
new TableTotalHours{ Date = new DateTime(2018,12,22), TotalHours = 9},
};
Где TablePricePerHours и TableTotalHours определены как
public class TableTotalHours
{
public int Id {get;set;}
public DateTime Date{get;set;}
public double TotalHours{get;set;}
}
public class TablePricePerHours
{
public int Id{get;set;}
public double Price{get;set;}
public double Tax{get;set;}
public DateTime Date{get;set;}
}
Теперь вы можете получить требуемый результат с Linq как
var result = tableTotalHours.Select(x=> new
{
Date=x.Date,
TotalHours=x.TotalHours,
CalculatedPrice = tablePricePerHours.Where(c=> (x.Date - c.Date).Ticks>0)
.OrderBy(c=> (x.Date - c.Date).Ticks)
.First()
.Price * x.TotalHours
});
Выход

Здесь можно найти тот же