回答

1

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; } 
} 
+0

這是非常dissapointing,這就是我竟是之後,避免編寫SQL查詢。看來這是不可能的,好吧。 – Pantelis

+0

@Pantelis看到我對CoolStorage的編輯。也許你可以試試那個。 –

+0

我以前見過它,但從未使用它。雖然我沒有看到任何地方提及Windows商店應用程序。這實際上是非常古老的,它的Windows Phone 7. – Pantelis

相關問題