【发布时间】:2017-10-02 18:06:01
【问题描述】:
当我使用时,我正在为 xamarin c# 使用 praeclarum sqlite-net 库:
var item = sQLiteConnection.Table<MyClass>()
.Where(e => (e.Id == CurrentId) && (e.name == Currentname));
给出异常:成员访问编译表达式失败
CurrentId 和 Currentname 都有一个值。 该表及其列确实存在。
我的班级是:
public class MyClass
{
[Ignore]
public List<ClassB> Bs{ get; set; }
public string BsAsJson { get; set; }
public string Datestamp { get; set; }
[PrimaryKey]
public string ClassId { get; set; }
public string SomeId { get; set; }
public string name { get; set; }
public MyClass ()
{ }
public MyClass (string datestamp, string id)
{
Bs= new List<ClassB>();
Datestamp = datestamp;
ClassId = id;
name= "Bagera";
SomeId= "SomeValue";
}
}
【问题讨论】:
标签: c# database sqlite xamarin sqlite-net