简体   繁体   English

我可以在 asp.net webAPI 应用程序的项目文件中找到脚本?

[英]Where I can find script in project files in asp.net webAPI app?

I create simple asp.net WEB API application.我创建了简单的 asp.net WEB API 应用程序。 When I run it, i see this view:当我运行它时,我看到了这个视图: 在此处输入图像描述

When I try to inspect code i see that in there are some scripts of course, but i cant find this scripts in my file in Visual Studio (project was generated automatically)... Can someone tells me why?当我尝试检查代码时,我看到其中当然有一些脚本,但我在 Visual Studio 的文件中找不到这些脚本(项目是自动生成的)......有人能告诉我为什么吗?

Source: {资源: {在此处输入图像描述 ] 2 ] 2

在此处输入图像描述

It is located in the weather forecast controller它位于天气预报 controller

There you find你在那里找到

public IEnumerable<WeatherForecast> Get()
{
  var rng = new Random();
  return Enumerable.Range(1, 5).Select(index => new WeatherForecast
  {
    Date = DateTime.Now.AddDays(index),
    TemperatureC = rng.Next(-20, 55),
    Summary = Summaries[rng.Next(Summaries.Length)]
  })
  .ToArray();
}

As you can see it creates 5 "WeatherForecast" with random numbers如您所见,它创建了 5 个带有随机数的“WeatherForecast”

The diplay part happens here.显示部分发生在这里。

  app.UseEndpoints(endpoints =>
  {
    endpoints.MapControllers();
  });

For the rest pkease check the documentation对于 rest pkease 检查文档

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在asp.net项目中管理常见的jquery脚本文件 - managing common jquery script files in asp.net project 如果javascript文件中存在语法错误,我能否使asp.net visual studio 2013项目构建失败? - Can I fail asp.net visual studio 2013 project builds if there's syntax errors in javascript files? 在我的asp.net项目中调用Webapi时出错 - Error while calling Webapi in my asp.net project 如何在ASP.NET MVC应用程序中自动压缩和最小化JavaScript文件? - How can I automatically compress and minimize JavaScript files in an ASP.NET MVC app? 如何从(jquery)Asp.Net webApi检索文件,并获得Asp.Net Identity授权 - How to retrieve files from (jquery) Asp.Net webApi, authorized with Asp.Net Identity 使用ASP.NET MVC Project运行脚本 - Running script with ASP.NET MVC Project 在asp.net项目中,如何提交javascript对象? - In an asp.net project, how can I submit javascript objects? ASP.Net-使用表单身份验证时,如何允许未经身份验证的用户查看导入的脚本文件? - ASP.Net - How can I allow imported script files be viewed by unauthenticated users when using Forms Authentication? 如何将以下使用复选框的数据表脚本代码全部调整到我的 asp.net 核心应用程序? - How can I adapt the following datatable script code which uses checkbox all to my asp.net core app? 如何从asp.net mvc项目中的脚本正确引用图像文件? - How to I properly reference an image file from a script in an asp.net mvc project?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM