Print Page | Close Window

Regarding the CurrentQueryId

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=833
Printed Date: 28-Mar-2025 at 3:50am


Topic: Regarding the CurrentQueryId
Posted By: viralvasaiwala
Subject: Regarding the CurrentQueryId
Date Posted: 09-Jun-2008 at 12:05am
Hello IDB,
 
When i try to serialize Entity of the IDEABLADE for my application requirement, then it is giving me the error given.
 
==================================================================================
Error Details :
Unable to generate a temporary class (result=1).
error CS0200: Property or indexer 'IdeaBlade.EntityModel.v4.Entity.CurrentQueryId' cannot be assigned to -- it is read only
==================================================================================
 
In Entity class "CurrentQueryId" propety is defined as "Internal Set"; Why it is defined such .... ??
Becuase of it we are not able to serialize that entity object as per our requirement. Please guide me for the same.
 
 
Thanks,
Viral Vasaiwala



Replies:
Posted By: kimj
Date Posted: 10-Jun-2008 at 10:54am
I assume you're trying to use XML serialization on your entities.  As you've found, this is not supported right now.
 
I'm not sure what your serialization requirements are, but you can store an entity cache offline using existing features of DevForce.  If you need to pass an entity in an InvokeServerMethod call we support that also.  In a future release we will offer support to expose your domain model via a web service, as we do in DevForce v3 today.


Posted By: danielp37
Date Posted: 10-Jun-2008 at 9:20pm
This is for XML serialization in the DevForce EF Entities and it is used in most cases to serialize the object to XML and then apply an XSLT to it to produce a document.  For example, we have an agreement object that actually has several subclasses that represent different types of agreements that we need to store.  When a user gets the option to click-sign the agreement, we serialize the object to XML and then do an XSLT transform to produce the text for the agreement (the agreement object might have properties on it that are used by the XSLT to product the resulting document).  Therefore the offline cache or invokeservermethod stuff really isn't going to work for us.  Also, usually the XML serialization in these cases is one way, ie representing the object as XML but not necessarily creating the object from XML.  We could obviously implement the IXmlSerializable interface, but would prefer a much more automated XML serialization.


Posted By: kimj
Date Posted: 11-Jun-2008 at 7:24am
Thanks for the explanation of your use case.
 
Unfortunately, we won't have support for XML serialization in Beta2, so implementing IXmlSerializable might be the best alternative now.
 
If you're not committed to using EF right away, DevForce v3 does support XML serialization today, so you might want to give that a try.



Print Page | Close Window