我正在使用 Azure-DevOps 发布管道来自动化部署。
我想安排发布创建在特定日期和时间发生。
但是根据下面的截图,只能选择星期几。并且您不能仅将触发器指定为一次。
这是一个问题,因为触发器会导致每周在指定日期发生一次发布,我们必须记住在每次发布后关闭触发器,直到我们准备好再次发布。
VSTS 中的当前功能是否可以设置特定日期,并且只发布一次?
可能的解决方法?
我在以下代码的注释中指出的行上收到警告。我正在使用Visual Studio2015。数据库中有2个表,并使用Linq-2-Sql查询它们。Linq代码在companyID的两个表之间执行左连接。
运行时,左联接将按预期运行,并且我获得了TestTable1中的所有值,但仅获得了CompanyIds匹配的TestTable2中的记录。
如果以下警告是正确的并且表达式始终为false,则字符串“ NULL”将永远不会分配给value1。事实并非如此,因为当我执行此操作时,执行“左联接”时将得到预期的准确时间“ NULL”。
我在代码的很多地方都使用了这种模式,这些警告无处不在,但是我的代码在执行NULL检查时可以正常工作。警告对我来说似乎是错误的。我在这里想念什么吗?
t2.CompanyId是类型INT的数据库字段。以及linq-2-sql类中的int数据类型,但在查询中仍然以某种方式将其分配为null。
var db = new SandBoxDataContext();
var result = (from t1 in db.TestTable1s
from t2 in db.TestTable2s
.Where(x => x.CompanyId == t1.CompanyId)
.DefaultIfEmpty()
select new
{
//t2.CompanyId == null in line below is underlined with the warning!
value1 = t2.CompanyId == null ? "NULL" : "INT"
}).ToList();
foreach (var rec in result)
{
Response.Write("value1 = " + rec.value1 + "<br>");
}
Run Code Online (Sandbox Code Playgroud)
这是警告
CS0472 The result of the expression is always 'false' since a …Run Code Online (Sandbox Code Playgroud) asp.net ×1
azure-devops ×1
azure-pipelines-release-pipeline ×1
c# ×1
linq ×1
linq-to-sql ×1
sql ×1