我想承诺我的作品.但是当我想看到我改变了什么并将它们写入提交消息时,我看到我的一些更改将不会显示.
问题是什么?
我有一个MVC 6(vNext/ASP.NET 5)项目,有一个用于DAL(数据访问层)的类库.现在我得到一个例外,因为NHibernate找不到我试图坚持的实体的映射文件.我已经看到严格的指令将此XML映射文件标记为嵌入式资源而不是复制到输出,但是在我设法为此文件打开的三个属性页中,没有任何一个可以规定这一点.
我只是转向基于代码的流畅映射,但这个问题并不是我的一个NHibernate映射文件所特有的.在解决方案资源管理器中右键单击的项目项的旧属性页面就消失了.我希望如果嵌入式资源这样的东西仍然存在,那么project.json我们必须在其他地方指定它.
我正在使用aurelia-validation,我创建了一个customRule.
规则验证逻辑:
export function validateCompare(value: any, obj: any, otherPropertyName: string) {
return value === null ||
value === undefined ||
value === "" ||
obj[otherPropertyName] === null ||
obj[otherPropertyName] === undefined ||
obj[otherPropertyName] === "" ||
value === obj[otherPropertyName];
}
Run Code Online (Sandbox Code Playgroud)
组态:
import { ValidationRules, validationMessages } from "aurelia-validation";
import { validateCompare } from "./compareValidation";
export function configureValidation() {
validationMessages["required"] = "${$displayName} é obrigatório";
validationMessages["email"] = "${$displayName} em formato inválido";
ValidationRules.customRule("compare", validateCompare, "${$displayName} não confere com ${$getDisplayName($config.otherPropertyName)}", otherPropertyName => ({ otherPropertyName …Run Code Online (Sandbox Code Playgroud)