public GetPrice ( |
||
price | ||
Résultat | decimal? |
public ViewResult Index(PriceLookup priceLookup) { if (ModelState.IsValid) { priceLookup.Price = _priceService.GetPrice(priceLookup); } return(View(priceLookup)); }
public ViewResult Index(PriceLookup price) { var connectionString = @"Data Source=" + Server.MapPath("App_Data/prices.s3db"); var priceDb = new PriceDb(connectionString); var priceSvc = new PriceService(ModelState, priceDb); if (ModelState.IsValid) price.Price = priceSvc.GetPrice(price); return View(price); }
public ViewResult Index(PriceLookup price) { var connectionString = @"Data Source=" + Server.MapPath("App_Data/prices.s3db"); var priceDb = new PriceDb(connectionString); var priceSvc = new PriceService(ModelState, priceDb); if (ModelState.IsValid) { price.Price = priceSvc.GetPrice(price); } return(View(price)); }