我生成了表Branches
getTimeValues: function() {
console.log('here i am');
var timeValues = this.timeValues;
var minTime = 11; //vary this to change the first
var maxTime = 19; //vary this to chage the
var string;
for (var i = minTime; i < maxTime; i++) {
if(i<12) {
lowersuffix = 'AM';
startRange = i;
}
else if(i===12){
lowersuffix = 'PM';
startRange = i;
}
else {
lowersuffix = 'PM';
startRange = i - 12;
}
if((i+1)<12) {
uppersuffix = 'AM';
endRange = (i+1);
}
else if((i+1)===12){
uppersuffix = 'PM';
endRange = (i+1);
}
else {
uppersuffix = 'PM';
endRange = (i+1) - 12;
}
string = startRange + lowersuffix + '-' + endRange + uppersuffix;
console.log(string);
timeValues.push(string);
};
},
在MSSQL中是表Branches和PK UniverId和BranchId
我创建了存储库并添加了新行,但经过几次 - VS抛出异常属性'BranchId'是对象的密钥信息的一部分,无法修改。
尽管如此,我认为这是因为BranchId中没有唯一数据 但我检查了所有行,但没有找到我的行。
public class Branch
{
[Key]
[Column(Order = 1)]
public Guid BranchId { get; set; }
[Key]
[Column(Order = 2)]
public Guid UniverId { get; set; }
}
我无法理解,我做错了什么?