public IActionResult OnGet() { Purchase = new Core.Purchase(); var customers = customerData.GetCustomers().ToList().Select(p => new { Id = p.Id, Display = $"{p.FirstName} {p.LastName}" }); Customers = new SelectList(customers, "Id", "Display"); return(Page()); }
public IActionResult OnGet() { Visit = new Visit(); var customers = customerData.GetCustomers().ToList().Select(c => new { Id = c.Id, Display = $"{c.FirstName} {c.LastName}" }); Customers = new SelectList(customers, "Id", "Display"); return(Page()); }
public IActionResult List(string SearchName, string SearchEmail) { var model = new CustomersListViewModel(); model.Customers = customerData.GetCustomers(SearchName, SearchEmail); return(View(model)); }
public IActionResult List() { var model = new MembershipsListViewModel(); model.Memberships = membershipData.GetMemberships(); model.Customers = customerData.GetCustomers(); return(View(model)); }
public async Task <IActionResult> GetCustomers( [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "customers")] HttpRequest req, ILogger log) { log.LogInformation("Retrieving customers"); var customers = _data.GetCustomers(); return(new OkObjectResult(customers)); }
public void OnGet() { Memberships = membershipData.GetMemberships(); Customers = customerData.GetCustomers(); }
public void OnGet() { Customers = customerData.GetCustomers(SearchName, SearchEmail); }
public IActionResult GetCustomers() { return(Ok(customerData.GetCustomers())); }
public void OnGet() { Customers = customerData.GetCustomers(SearchTerm); }
public IActionResult GetCustomersAll() { var data = customerData.GetCustomers(); return(Ok(data)); }