// [EnableCors("allowedOrigins")] public IActionResult GetAllCustomers() { try { return(Ok(customerServices.GetAllCustomers())); } catch (Exception) { return(BadRequest()); } }
public IEnumerable <Customers> GetAllCustomers() { return(_customerServices.GetAllCustomers()); }
public async Task <IActionResult> Index() { var customers = await _customerServices.GetAllCustomers(); return(View(customers.OrderByDescending(x => x.DateTimeAdd))); }
// GET: Customers public ActionResult Index() { return(View(service.GetAllCustomers())); }