显示

MVC调API的显示
跨域 手动引用 
建立model
dal层
控制器里写连接字符
 </appSettings> <system.webServer>里写
<connectionStrings>
  <add name="con" connectionString="Data Source=.;Initial Catalog=RKJN;Integrated Security=True"/>
 </connectionStrings>
dal dal = new dal();

        [HttpGet]
        [Route("api/Show")]
        public List<model> Show()
        {
            return dal.Show();
        }
dal需要yinyong
 
 
 
 
posted @ 2020-06-16 11:10  G蠢蠢  阅读(557)  评论(0编辑  收藏  举报