There is no argument given that corresponds to the required formal parameter 'OrdersQuery' of 'OrderBusiness.GetTodayOrders(IQueryable)' ProductAppWinforms
Това е метод, който филтрира база данни, за да покаже Orders само от Date.Time.Today.
public IQueryable<Order> GetTodayOrders(IQueryable<Order> OrdersQuery)
{
var orderfilter = OrdersQuery.Where(o => o.Time >= DateTime.Today && o.Time < DateTime.Today.AddDays(1));
return orderfilter;
}
На GetTodayOrders() показва тази грешка:
There is no argument given that corresponds to the required formal parameter 'OrdersQuery' of 'OrderBusiness.GetTodayOrders(IQueryable)' ProductAppWinforms
Form1.cs
private void UpdateGrid2()
{
dataGridView1.DataSource = orderBusiness.GetTodayOrders();
dataGridView1.ReadOnly = true;
dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
}
Някакви идеи как да го оправя?