SL5 + EF + WCF 응용 프로그램에서이 웹 서비스 오류 가끔이 표시됩니다.도메인 조작 항목 xxx의 매개 변수 xxx는 미리 정의 된 직렬화 가능 유형 중 하나 여야합니다
도메인 조작 항목 'AddUserPresentationModelToRole'의 "매개 변수 '역할'은 사전 정의 된 직렬화 가능 유형 중 하나 여야합니다."
here도 비슷한 오류이지만 해결책은 저에게는 적합하지 않습니다.
나는 codegenned 내 클라이언트에 데이터베이스 엔티티를 표면 DomainService 있습니다
[EnableClientAccess()]
public partial class ClientAppDomainService : LinqToEntitiesDomainService<ClientAppUserEntitlementReviewEntities>
{
public IQueryable<Account> GetAccounts()
{
return this.ObjectContext.Accounts;
}
//..etc...
및 프리젠 테이션 모델을 표면화되고 내 사용자 정의 서비스, DB 엔티티.
[EnableClientAccess]
[LinqToEntitiesDomainServiceDescriptionProvider(typeof(ClientAppUserEntitlementReviewEntities))]
public class UserColourService : DomainService
{
[Update(UsingCustomMethod = true)]
public void AddUserPresentationModelToRole(UserPresentationModel userPM, Role role, Reviewer reviewer)
{
...
}
public IDictionary<long, byte> GetColourStatesOfUsers(IEnumerable<RBSUser> listOfUsers, string adLogin)
{
//....
}
}
과 PresentationModel
:public class UserPresentationModel
{
[Key]
public long UserID { get; set; }
public byte UserStatusColour { get; set; }
public string MessageText { get; set; }
[Include]
[Association("asdf", "UserID", "UserID")]
public EntityCollection<Account> Accounts { get; set; }
public DateTime AddedDate { get; set; }
public Nullable<long> CostCentreID { get; set; }
public DateTime? DeletedDate { get; set; }
public string EmailAddress { get; set; }
public long EmployeeID { get; set; }
public string FirstName { get; set; }
public Nullable<bool> IsLeaver { get; set; }
public string LastName { get; set; }
public DateTime LastSeenDate { get; set; }
public string LoginDomain { get; set; }
public string LoginName { get; set; }
public byte WorldBuilderStatusID { get; set; }
}
는 또한 솔루션을 안정적으로 실패를 얻을 수 없습니다. 내가 서비스를 약간 바꿀 때마다, 즉 다시 컴파일하게되면 모든 것이 작동하는 것 같습니다.
RIAServices unsupported types on hand-built DomainService - LinqToEntitiesDomainServiceDescriptionProvider를 사용하여 손으로 작성된 서비스를 꾸미는 것이 효과가 있습니다.