ICollection <OrderProduct> IService1.GetOrderProduct(string orderId) { List <OrderProduct> list = new List <OrderProduct>(); foreach (var item in _bll.GetOrderProduct(Int32.Parse(orderId))) { OrderProduct orderProduct = new OrderProduct { Id = item.Id, OrderId = item.OrderId, ProductId = item.ProductId }; list.Add(orderProduct); } return(list.ToArray()); }