嗨我有兩個類,其中包含屬性&我有一個類,其中包含兩個類的列表作爲其屬性。我應該返回一個單獨的列表,其中包含兩個類的對象,這些對象都是在created_date.Can any1 help上排序的。我已經粘貼了以下3類:將兩個列表整理爲一個
這是第一類: -
public partial class TouchPointModel : BaseModel
{
public List<EntityModel> Entities { get; set; }
public UserModel User { get; set; }
public int TouchPointId { get; set; }
public string Description { get; set; }
public int EntityId { get; set; }
public DateTime Created_date{ get;set; }
}
這是第二類: -
public partial class SurveyModel : BaseModel
{
public int Id { get; set; }
public int SelectedEntityId { get; set; }
public int SelectedEntityType { get; set; }
public int ParentEntityId { get; set; }
public bool IsMyProjects { get; set; }
public DateTime Created_date{ get;set; }
}
&這是普通類
public partial class RecentInteractionsModel
{
public int ContactId { get; set; }
public List<TouchPointModel> TouchPoints { get; set; }
public List<SurveyModel> Surveys { get; set; }
public int EntityId { get; set; }
public int EntityTypeId { get; set; }
public int SelectedParentId { get; set; }
}
對於UI,我應該顯示最新的接觸點或調查取決於cr過時的日期。
你能否澄清一點點你是什麼試圖實現 – juanreyesv 2013-03-04 04:45:11
'SurveyModel'是否也來自'BaseModel'? – 2013-03-04 04:49:38
是調查模式也從基礎模型 – 2013-03-04 05:54:02