示例#1
0
        public async Task <ActionResult <List <Stationery> > > GetAllStationeries()
        {
            var result = await _clkService.findAllStationeriesAsync();

            // if find data then return result else will return a String says Department not found
            if (result != null)
            {
                //Docs says that Ok(...) will AUTO TRANSFER result into JSON Type
                return(Ok(result));
            }
            else
            {
                return(NotFound("Stationeries not found"));
            }
        }