I have two models
So when I use linq to return the data for orders it has a list of Lineitems for each order embedded
I need to be able to return the order information by searching the sku name.
So say I need to see the order information for the Lineitem with the sku radio123
I am not sure how to write the link query to search Lineitems and return a subset of data based on the sku name.
Any Help would be appreciated.
Order Model:
Public Class Orders
{
public int id{ get; set; }
public string OrderNumber{ get; set; }
public Int Status{ get; set; }
public datetime OrderDate{ get; set; }
public List<LineItem> LineItems { get; set; }
}
Public Class LineItem
{
public int Id { get; set; }
public int OrderId { get; set; }
public int ProductId { get; set; }
public string Sku { get; set; }
public string Name { get; set; }
public int QtyOrdered { get; set; }
public int QtyLeftToShip { get; set; }
public int QtyShipped { get; set; }
public double Price { get; set; }
public double Tax { get; set; }
}
I need to be able to return the order information by searching the sku name.
So say I need to see the order information for the Lineitem with the sku radio123
I am not sure how to write the link query to search Lineitems and return a subset of data based on the sku name.
Any Help would be appreciated.
Last edited: