New Posts New Posts RSS Feed: OData and EdmKeys with Azure
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

OData and EdmKeys with Azure

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

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Topic: OData and EdmKeys with Azure
    Posted: 14-Jan-2011 at 9:46am

Most of the usual DevForce features can still be used when the EntityManager is hosted by a data service.  So you can continue to use either EdmKeys or <connectionStrings> to hold your connection information, and DevForce will do its usual lookup based on the DataSourceKeyName attribute set on the entities in the model.  You'll define the key/connection in the web.config.

If you're using data source extensions, you would provide the extension to the EntityManager constructor by overriding the CreateDataSource method on the DataService.  If you're not using extensions there's probably no need to override this method as the default implementation will use the EM's parameterless constructor.
Back to Top
GeorgeB View Drop Down
Groupie
Groupie


Joined: 03-May-2010
Posts: 66
Post Options Post Options   Quote GeorgeB Quote  Post ReplyReply Direct Link To This Post Posted: 14-Jan-2011 at 7:18am
Hi
 
When testing against the Azure development fabric, I connect to a local database and when deployed into Azure, I connect to a SQL Azure database (using EdmKeys). 
 
How do I do this when using OData? Should I override CreateDataSource()? If so how do I know which EdmKey to use?
 
I don't mind only specifying the Azure database as my testing for this is only being done in the Azure.
 
Kr
George


Edited by GeorgeB - 14-Jan-2011 at 8:11am
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down