Exemplo n.º 1
0
 private async Task SetReferenceData(ProductCreateModel model)
 {
     model.AvailableAlequots = (await _biopsyStore.GetAlequotsAsync()).Select(a => new SelectListItem() { Text = a.Id, Value = a.Id });
     model.AvailableProductTypes = (await _productStore.GetProductTypesAsync()).Select(a => new SelectListItem() { Text = a.Name, Value = a.Id.ToString() });
 }
Exemplo n.º 2
0
 // GET: /Product/Create
 public async Task<ActionResult> Create()
 {
     var model = new ProductCreateModel();
     await SetReferenceData(model);
     return View(model);
 }