示例#1
0
        public async Task <ActionResult <List <Supplier> > > GetAllSuppliers()
        {
            var result = await _clkService.findAllSuppliersAsync();

            if (result != null)
            {
                //Docs says that Ok(...) will AUTO TRANSFER result into JSON Type
                return(Ok(result));
            }
            else
            {
                //this help to return a NOTfOUND result, u can customerize the string.
                return(NotFound("Suppliers not found"));
            }
        }