コード例 #1
0
        void PrintAll()
        {
            IEnumerable <Dept> deptCollection = deptService.GetAll();

            foreach (Dept item in deptCollection)
            {
                Console.WriteLine(item.Id + " \t " + item.DName + " \t " + item.Loc);
            }
        }
コード例 #2
0
 public IHttpActionResult GetAll()
 {
     try
     {
         var Depts = _service.GetAll();
         return(Ok(Depts));
     }
     catch (Exception ex)
     {
         return(InternalServerError());
     }
 }
コード例 #3
0
ファイル: DeptController.cs プロジェクト: Stone1231/core-be
 public IEnumerable <Dept> Get()
 {
     return(_service.GetAll());
 }