public CreateOrder ( List |
||
OrderDetails | List |
|
CustomerId | string | |
Freight | decimal | |
ShipVia | int | |
ShipName | string | |
ShipAddress | string | |
ShipCity | string | |
ShipRegion | string | |
ShipPostalCode | string | |
ShipCountry | string | |
return | int |
public int CreateOrder(List<OrderDetail> OrderDetails, string CustomerId, decimal Freight, int ShipVia, string ShipName, string ShipAddress, string ShipCity,
string ShipRegion, string ShipPostalCode, string ShipCountry)
{
var order = new Order()
{
CustomerId = CustomerId,
Freight = Freight,
OrderDate = DateTime.Today,
RequiredDate = DateTime.Today.AddDays(7.0),
ShipAddress = ShipAddress,
ShipCity = ShipCity,
ShipCountry = ShipCountry,
ShipPostalCode = ShipPostalCode,
ShipRegion = ShipRegion,
ShipName = ShipName,
ShipVia = ShipVia,
OrderDetails = OrderDetails
};
order = _context.Orders.Add(order);
return order.OrderId;
}
public void CreateOrderPayment(int OrderId, Decimal AmountPaid, string CreditCardNumber, DateTime ExpirationDate, string ApprovalCode)
OrderRepository::CreateOrder ( Core.Order Order ) : int |