2013-07-16 122 views
0

我有兩個結點/網橋表,DailyLogEmployees和DailyLogVendors來處理多對多的關係:許多不工作的許多關係

public class DailyLog:ActiveEntity 
{ 
    public int Id {get;set;} 
    [ForeignKey("EmployeeId")] 
    public ICollection<Employee> Employees { get; set; } 
    [ForeignKey("VendorId")] 
    public ICollection<Vendor> Vendors { get; set; } 
} 
and defined in the model as such 
modelBuilder.Entity<DailyLog>().HasMany(d => d.Employees).WithMany().Map(m => 
    {                         m.MapLeftKey("DailyLogId"); 
                         m.MapRightKey("EmployeeId"); 
                         m.ToTable("DailyLogEmployees"); 
                        }); 
modelBuilder.Entity<DailyLog>().HasMany(d => d.Vendors).WithMany().Map(m => 
    {                       m.MapLeftKey("DailyLogId"); 
                          m.MapRightKey("VendorId"); 
                          m.ToTable(
                           "DailyLogVendors"); 
                         }); 

在元數據中創建的項目,但是當我實例化一個新DailyLog ,員工或供應商都不在場。

Breeze是版本1.3.6我做了一些愚蠢的事情,我不希望任何導航另一邊,員工或供應商就在DailyLog的任何幫助或洞察力是讚賞。

回答

2

微風不支持許多關係。目前,您可以將這些信息公開爲兩個一對多關係......並請將您的投票添加到我們的關於此主題的User-Voice