// [EnableCors("allowedOrigins")]
 public IActionResult GetAllCustomers()
 {
     try
     {
         return(Ok(customerServices.GetAllCustomers()));
     }
     catch (Exception)
     {
         return(BadRequest());
     }
 }
예제 #2
0
 public IEnumerable <Customers> GetAllCustomers()
 {
     return(_customerServices.GetAllCustomers());
 }
        public async Task <IActionResult> Index()
        {
            var customers = await _customerServices.GetAllCustomers();

            return(View(customers.OrderByDescending(x => x.DateTimeAdd)));
        }
예제 #4
0
 // GET: Customers
 public ActionResult Index()
 {
     return(View(service.GetAllCustomers()));
 }