-2
我使用實體框架,並有一些類哪些屬性應該被用於正確assotiation
public class Lot
{
public int LotId { get; set; }
public string Description { get; set; }
public virtual Product Product { get; set; }
public virtual ApplicationUser Owner { get; set; }
public virtual ApplicationUser CurrentCustomer { get; set; }
public virtual ICollection<ApplicationUser> AllCustomers { get; set; }
public virtual AuctionDates AuctionDates { get; set; }
public virtual AuctionPrices AuctionPrices { get; set; }
public virtual State State { get; set; }
public virtual ProductImages Images { get; set; }
}
和
public class ApplicationUser : IdentityUser
{
[Required]
public virtual UserInfo UserInfo { get; set; }
public virtual ICollection<Lot> SelledLots { get; set; }
public virtual ICollection<Lot> BuyedLots { get; set; }
public virtual ICollection<Lot> ParticipatedLots { get; set; }
}
,問題是我怎麼可以設置誰賣映射的用戶配置業主(Lot)中的批次(ApplicationUser),在當前客戶(Lot)中購買批次(ApplicationUser)等等。非常感謝。
把一些代碼請... – 2014-11-08 19:59:19