3
這就是問題所在。我讀過EF7將支持Windows Store和Windows Phone的SQLite,但是現在的交易是什麼?是否有任何其他ORM支持Universal Apps上的SQLite?是否有支持SQLite for Universal Apps的ORM?
這就是問題所在。我讀過EF7將支持Windows Store和Windows Phone的SQLite,但是現在的交易是什麼?是否有任何其他ORM支持Universal Apps上的SQLite?是否有支持SQLite for Universal Apps的ORM?
有CoolStorage但我沒有任何有關該ORM的經驗。
本身不是一個ORM,但檢出SQLite.Net連同SQLite.Net Extensions。 我現在在通用應用程序中使用它,它足夠滿足我需要的功能。
請注意這裏有not yet support for relations in LINQ。
我自己現在使用的擴展是這樣的:
public class Bar
{
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
public string Title { get; set; }
[ManyToMany(typeof(FooBar))]
public List<Foo> Foos{ get; set; }
}
public class Foo
{
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
public string Title { get; set; }
[ManyToMany(typeof(FooBar))]
public List<Bar> Bars{ get; set; }
}
public class FooBar
{
[ForeignKey(typeof(Foo))]
public int FooId{ get; set; }
[ForeignKey(typeof(Bar))]
public int BarId{ get; set; }
}
這是非常dissapointing,這就是我竟是之後,避免編寫SQL查詢。看來這是不可能的,好吧。 – Pantelis
@Pantelis看到我對CoolStorage的編輯。也許你可以試試那個。 –
我以前見過它,但從未使用它。雖然我沒有看到任何地方提及Windows商店應用程序。這實際上是非常古老的,它的Windows Phone 7. – Pantelis