我使用
SqlQuery调用存储过程,结果应该是对象图,即
public class Person { public int Id{get;set;} public string FullName {get;set;} public Address HomeAddress {get;set;} public Vehicle PrivateVehicle {get;set;} }
但是sqlQuery不会映射地址和车辆.它只将列名映射到属性.
有没有解决这个问题?我怎么做映射?
.. what you can’t do is return graphs of objects,e.g. entities that contain properties of complex types.