using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using DiplomovaPrace.Model.Orders;
using Microsoft.EntityFrameworkCore;

namespace DiplomovaPrace.DataLayer.Repositories.Orders
{
	public partial class OrderItemDbRepository : IOrderItemRepository
	{
		public async Task<List<OrderItem>> GetOrderItemsByOrderIDAsync(int orderID)
		{
			return await Data.Where(i => i.OrderID == orderID).ToListAsync().ConfigureAwait(false);
		}
	}
}