New Posts New Posts RSS Feed: NumericIdGenerator
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

NumericIdGenerator

 Post Reply Post Reply
Author
GregD View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 374
Post Options Post Options   Quote GregD Quote  Post ReplyReply Direct Link To This Post Topic: NumericIdGenerator
    Posted: 18-Jun-2010 at 2:17pm
We've updated the NumericIdGenerator in-house to work properly with Silverlight; the new version will be included with our next release. Anyone who needs it before then, please contact Support.
Back to Top
GregD View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 374
Post Options Post Options   Quote GregD Quote  Post ReplyReply Direct Link To This Post Posted: 12-Jun-2010 at 7:01am
I'll check into it.
Back to Top
Vincent View Drop Down
Newbie
Newbie


Joined: 21-May-2010
Location: Tanzania
Posts: 22
Post Options Post Options   Quote Vincent Quote  Post ReplyReply Direct Link To This Post Posted: 11-Jun-2010 at 11:40pm

Here is the code

public bool IsApplicable(IDataSourceKey dataSourceKey)

{

//return dataSourceKey.Name.StartsWith("IdeaBladeTest", StringComparison.OrdinalIgnoreCase);

//

return true;

//bool _IsApplicable = dataSourceKey.Name.StartsWith("testEntities", StringComparison.OrdinalIgnoreCase);

//return _IsApplicable;

 

}

 
My proble is with silverlight 4 which does not support reference to these DLLs System.Data; and System.Data.Common; which are used by the NumericIdGenerator class.
 
Is there any other way of making the NumericIdGenerator class available on client side in silverlight without making a reference to it?
Back to Top
GregD View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 374
Post Options Post Options   Quote GregD Quote  Post ReplyReply Direct Link To This Post Posted: 11-Jun-2010 at 10:59am
Can you show me the code for the IsApplicable method in your NumericIdGenerator class?
Back to Top
Vincent View Drop Down
Newbie
Newbie


Joined: 21-May-2010
Location: Tanzania
Posts: 22
Post Options Post Options   Quote Vincent Quote  Post ReplyReply Direct Link To This Post Posted: 10-Jun-2010 at 8:28pm
Thank you for the reply
 
The problem is, when I put a break on the Isapplicable function, and start debugging my project, the application executes the NumericIdGenerator class and the Isapplicable function returns true. But when I try to create new entity thereafter,  the error comes out.
 
So I think  Isapplicable function is ok and yet I get the error.
Back to Top
GregD View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 374
Post Options Post Options   Quote GregD Quote  Post ReplyReply Direct Link To This Post Posted: 10-Jun-2010 at 4:15pm
Check the IsApplicable() method in NumericIdGenerator. The sample in the LearningResources returns false unless the DatasourceKey starts with "IdeaBladeTest1", which I'm guessing yours doesn't. 8-)

Just set it to return true, unconditionally, and your sample will probably start working.
Back to Top
Vincent View Drop Down
Newbie
Newbie


Joined: 21-May-2010
Location: Tanzania
Posts: 22
Post Options Post Options   Quote Vincent Quote  Post ReplyReply Direct Link To This Post Posted: 10-Jun-2010 at 6:51am
Hi everybody
 
I am trying to generate id before saving using NumericIdGenerator class which I added into my silverlight 4 web project but every time I try to create a new entity it fires the following error below
 

No class implementing IdeaBlade.EntityModel.IIdGenerator was found. If you have implemented this interface, be sure to decorate the class with an Export(typeof(IIdGenerator)) attribute. Also check the IsApplicable(IDataSourceKey) method in your implementation to ensure that it is filtering correctly.

Can anybody with solution to the problem or know how to use NumericIdGenerator class  help me.

Thank you
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down