My understanding is that find only takes the primary key as the parameter. That works great if the value you are looking for is actually the primary key. In my case, I have a class like this:
public class Chamber
{
[Key]
public int Id {get;set;}
public string ChamberName { get; set; }
}
我想检查一下,在我的情况或数据库本身中是否存在一个<代码>ChamberName。 我如何能够这样做? 我首先要看一下一下一下一下情况,然后在数据库中看到,有人叫db.Chambers.处(a=>a.ChamberName.equals.
?
如果是<条码>,我会看到它运作良好。 ChamberName是我的主要关键,但不是。
THanks,