我对合并两个对象的项目进行了分组。我需要选择一个可以为null或对象集的对象类型,然后使用projectTo将其映射到另一种模型视图类,而不知道如何做到这一点。
val myIntList = listOf(3, 4, 2)
myIntList.sum() // = 9
val myDoubleList = listOf(3.2, 4.1, 2.0)
myDoubleList.sum() // = 9.3
..
public class UsersWithAccessProfileDataView
{
public UserDataView User { get; set; }
public List<UserDetailRolesDataView> UserRoles { get; set; }
}
public class UserDetailRolesDataView
{
public Guid UserId { get; set; }
public Guid RoleId { get; set; }
public Guid? ClientId { get; set; }
public Guid? ConsultationId { get; set; }
}