Print Page | Close Window

WinRT, Code First - RSMC does not work.

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2012
Forum Discription: For .NET 4.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=4292
Printed Date: 06-Sep-2025 at 6:51am


Topic: WinRT, Code First - RSMC does not work.
Posted By: zbig
Subject: WinRT, Code First - RSMC does not work.
Date Posted: 27-Aug-2013 at 11:11am
Hi,

WinRT, Code First, DevForce 2012 7.2.

Following the documentation, I am testing Remote Server Method Calls (RSMC) and this functionality does not work properly.

During executing:
" ... InvokeServerMethodAsync(...);"

the error message appears:
"Constructor on type 'AppTest.AppTestEntityManager' not found."

Please find attached a very simple solution which exemplifies the problem (libraries removed).

Thansk in advance for any help.

uploads/1552/AppTestRsmc.zip - AppTestRsmc.zip



Replies:
Posted By: kimj
Date Posted: 27-Aug-2013 at 3:17pm
For somewhat obscure and not well-documented reasons, the EntityServer will try to construct your sub-typed EntityManager for the RSMC call.  It will only look for a constructor with a signature accepting EM and EntityManagerContext arguments, so you can add a constructor like the following to work around the problem:
 
public AppTestEntityManager(EntityManager entityManager, EntityManagerContext entityManagerContext = null) : base(entityManager, entityManagerContext) { }
 
 



Print Page | Close Window