예제 #1
0
        public IEnumerable <Dosen> Get()
        {
            DosenRepo dosen     = new DosenRepo();
            var       listDosen = dosen.getAll();

            return(listDosen);
        }
예제 #2
0
        public IActionResult Get()
        {
            DosenRepo dosen     = new DosenRepo();
            var       listDosen = dosen.getAll();

            if (listDosen == null)
            {
                var response = new ContentResult()
                {
                    StatusCode = StatusCodes.Status204NoContent,
                };
                return(response);
            }
            else
            {
                return(Ok(listDosen));
            }
        }