C# Class OpenLan.Web.Models.ShoppingCart

显示文件 Open project: scarpentier/OpenLan Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
AddToCart ( Product product ) : void
CreateOrder ( Order order ) : Task
EmptyCart ( ) : void
GetCart ( OpenLanContext db, Microsoft.AspNet.Http.HttpContext context ) : ShoppingCart
GetCartId ( Microsoft.AspNet.Http.HttpContext context ) : string
GetCartItems ( ) : Task>
GetCount ( ) : Task
GetTotal ( ) : Task
RemoveFromCart ( int id ) : int
ShoppingCart ( OpenLanContext dbContext ) : Microsoft.AspNet.Http

Method Details

AddToCart() public method

public AddToCart ( Product product ) : void
product Product
return void

CreateOrder() public method

public CreateOrder ( Order order ) : Task
order Order
return Task

EmptyCart() public method

public EmptyCart ( ) : void
return void

GetCart() public static method

public static GetCart ( OpenLanContext db, Microsoft.AspNet.Http.HttpContext context ) : ShoppingCart
db OpenLanContext
context Microsoft.AspNet.Http.HttpContext
return ShoppingCart

GetCartId() public method

public GetCartId ( Microsoft.AspNet.Http.HttpContext context ) : string
context Microsoft.AspNet.Http.HttpContext
return string

GetCartItems() public method

public GetCartItems ( ) : Task>
return Task>

GetCount() public method

public GetCount ( ) : Task
return Task

GetTotal() public method

public GetTotal ( ) : Task
return Task

RemoveFromCart() public method

public RemoveFromCart ( int id ) : int
id int
return int

ShoppingCart() public method

public ShoppingCart ( OpenLanContext dbContext ) : Microsoft.AspNet.Http
dbContext OpenLanContext
return Microsoft.AspNet.Http