1
RIA 서비스가 있고 RIA 서비스 (예 : 문자열, int 등)에 대한 일반 등록 정보가 생성되고 있습니다.리스트 <User> Ria 서비스로 생성되지 않는 속성
아래에 설명 된 맞춤 유형 사용자가 있습니다. 내 목록 속성이 Ria 서비스의 일부로 생성되지 않습니다. 어떤 아이디어?
예는 다음과 RIA 서비스에서 생성되지 않는 속성이 사용자 클래스
public List<User> Users
{
get
{
if(this.users == null)
{
this.users = new List<User>();
}
return this.users;
}
set
{
this.users = new List<User>(value);
}
}
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ServiceModel.DomainServices.Server;
namespace MyNamespace
{
public class User
{
[Key]
public int? Id { get; set; }
public string Login { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string DisplayName { get; set; }
public string Email { get; set; }
public string Title
{
get;
set;
}
public string Department
{
get;
set;
}
public string Password { get; set; }
public string Source { get; set; }
public bool? IsEnabled { get; set; }
public bool IsInstanceAdmin { get; set; }
public byte[] Image { get; set; }
//public bool IsDeleted { get; set; }
private IList<UserGroupMembership> _userGroups;
/// <summary>
/// Gets or sets the user groups.
/// </summary>
/// <value>The user groups.</value>
[Include]
[Association("UserGroups", "Id", "UserId")]
public IList<UserGroupMembership> UserGroups
{
get
{
if (_userGroups == null)
{
_userGroups = new List<UserGroupMembership>();
}
return _userGroups;
}
set
{
_userGroups = value;
}
}
private IList<RoleAssignment> _roleIdentity;
/// <summary>
/// Gets or sets the role identities.
/// </summary>
/// <value>The role identities.</value>
[Include]
[Association("RoleIdentities", "Id", "UserId")]
public IList<RoleAssignment> RoleAssignments
{
get
{
if (_roleIdentity == null)
{
_roleIdentity = new List<RoleAssignment>();
}
return _roleIdentity;
}
set
{
_roleIdentity = value;
}
}
}
}