Suppose you generate an Entity Framework model on standard northwind database, you have a customer id and you want to generate an order for that customer. A possible solution is
using (ModelTestBase context = new ModelTestBase())
{
Orders order = new Orders();
order.Freight = 1.0M;
order...