|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ModelLibrary;
using ContractsLibrary;
using System.ComponentModel.Composition;
namespace TestLibrary
{
[Export(typeof(IOrderSubmissionService<Order>))]
public class TestOrderSubmission : IOrderSubmissionService<Order>
{
public IEnumerable<Order> GetPendingOrders()
{
return new List<Order>()
{
new Order() { Id=1, Customer = "Gareth", Lines = new List<OrderLine>()
{
new OrderLine()
{
ItemId = 1,
ItemDescription = "Title 1",
Price=15.95,
Quantity = 6
},
new OrderLine()
{
ItemId = 2,
ItemDescription = "Title 2",
Price = 6.49,
Quantity = 3
}
}
},
new Order() { Id = 2, Customer = "Ian", Lines = new List<OrderLine>()
{
new OrderLine()
{
ItemId = 3,
ItemDescription = "Title 3",
Price=9.95,
Quantity = 6
},
new OrderLine()
{
ItemId = 2,
ItemDescription = "Title 4",
Price = 8.95,
Quantity = 7
}
}
}
};
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I am Gareth, working in the book industry specializing in EDI and B2B integration. Starting out as a child bashing out programs on the old commodore 64, I have since progressed from VB6 through the .net framework and loving c#, wf, wpf and where these are heading... hoping one day to have the excuse to play with silverlight.