我看到以下代码应用于 .net core 操作方法:
[HttpPost("MyAction", Name = "MyAction")]
public IActionResult MyAction()
{
// some code here
}
Run Code Online (Sandbox Code Playgroud)
HttpPost 属性中“Name”参数的用途是什么?
我有以下代码片段。我对后面提到的代码片段几乎没有疑问。
var salaries = customerList
.Where(c => c.Age > 30)
.Select(c => c.Salary) // salary is of type long
.ToList();
Run Code Online (Sandbox Code Playgroud)
我有以下html片段.我希望背景颜色为红色的div与高度为15.56 + 77.33 + 73.33的div的总高度相同
<body>
<!-- outer div -->
<div style="background-color:gray;">
<div style="background-color: black; float: left;">
<div>
<div>
<div style="height: 15.56px; background-color: blue;">Blue</div>
<div style="height: 77.33px; background-color: green;">Green</div>
<div style="height: 73.33px; background-color: orange;">Orange</div>
</div>
</div>
</div>
<div style="background-color: red; display: inline-block; height: inherit;">
Should be red!
</div>
</div>
<body>
Run Code Online (Sandbox Code Playgroud)