2022年8月
应用程序环境变量和配置
.Net
设置配置文件
appsettings.{环境名}
.json
例如:appsettings.AliyunTest.json
设置环境变量
IIS 部署运行下的 ,web.config 设置环境变量
<configuration> <location path="." inheritInChildApplications="false"> <system.webServer> <aspNetCore processPath="dotnet" arguments=".\xxxxxxx.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" > <environmentVariables> <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="AliyunTest" /> </environmentVariables> </aspNetCore> </system.webServer> </location> </configuration>
控制台运行(适用于jenkins运行)
set ASPNETCORE_ENVIRONMENT=AliyunTest dotnet run --no-launch-profile
参考:
SQLServer Delete Join 语法
语法如下:
DELETE [dbo].[UC_Employee_his]
FROM [dbo].[UC_Employee_his] a
INNER JOIN
(
SELECT (GID + TeamCode + CAST(CheckOut AS NVARCHAR(50))) flag,-- 唯一标识:GID + 部门Code + CheckOut时间
ROW_NUMBER() OVER (PARTITION BY GID + TeamCode + CAST(CheckOut AS NVARCHAR(50))
ORDER BY GID + TeamCode + CAST(CheckOut AS NVARCHAR(50))
) rowNumber,
*
FROM [dbo].[UC_Employee_his]
) b ON a.Id = b.Id
WHERE b.rowNumber >= 2