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