肖恩D++
Not Equal C && !=C && 不等于西
-
Predicates in Lambda Expression for Entity Framework Code First
Posted on July 24th, 2013 1 commentIf I have 2 entities of “People” and “Car”, and “1” People can have “Many” Car, my code first class could be like below:
12345678910111213141516171819public class People{[key]public int ID { get; set; }public string Name { get; set; }public virtual ICollection<Car> Cars { get; set; }}public class Car{[key]public string VIN { get; set; }public string Maker { get; set; }public int OwnerID { get; set; }[ForeignKey("OwnerID")]public virtual People Owner { get; set; }}
641 views
Recent Comments