Print Page | Close Window

exsiting ADO.Net Entity Model

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1915
Printed Date: 28-Jan-2026 at 2:04pm


Topic: exsiting ADO.Net Entity Model
Posted By: Jakes
Subject: exsiting ADO.Net Entity Model
Date Posted: 25-Jun-2010 at 1:25am
Hi everyone

All the examples and tutorials that Ive seen, have you creating a new entity model through the devforce process for the silverlight access. My question is, how would you link an existing entity model in another project (DAL) to a silverlight devforce project?

Thanks guys



Replies:
Posted By: ting
Date Posted: 25-Jun-2010 at 2:15pm

You can include a pre-existing Entity Data Model in a DevForce project, and if you have DevForce code generation turned on, it will create the DevForce base classes for you.



Posted By: Jakes
Date Posted: 26-Jun-2010 at 4:35am
How do you go about doing that, including a pre-existing EDM into a devforce 2010 project?


Posted By: Jakes
Date Posted: 28-Jun-2010 at 5:10am
Does any know how to add an existing EM. I am a newbie when it comes to devforce.


Posted By: ting
Date Posted: 28-Jun-2010 at 6:03pm
You can copy the edmx into your Model or Web project and include it in the project (click the 'Show All Files' icon in Solution Explorer and right click the edmx and select 'Include In Project') , or you can right click the project and select 'Add' -> 'Existing Item...'
 
When you next save the edmx, the DevForce code should be generated and a link created in your Silverlight project to the shared file.
 
 


Posted By: Jakes
Date Posted: 02-Jul-2010 at 6:13am
Originally posted by ting

You can copy the edmx into your Model or Web project and include it in the project (click the 'Show All Files' icon in Solution Explorer and right click the edmx and select 'Include In Project') , or you can right click the project and select 'Add' -> 'Existing Item...'

 

When you next save the edmx, the DevForce code should be generated and a link created in your Silverlight project to the shared file.

 

 


What are you talking about dude. I'm not needing a visual studio for dummies lesson. My question is around the entity model itself working with IdeaBlade. Where do you set the configuration for IdeaBlade to pick up the entity model?


Posted By: ting
Date Posted: 02-Jul-2010 at 6:46am

Once DevForce is installed, it should automatically generate DevForce objects as soon as you re-save the edmx.  If not, check the properties page for the edmx and set "DevForce Enabled" to true.  If that doesn't show up, go to "Tools -> Extension Manager" and check to see if the IdeaBlade OM Designer is enabled.  If the extension doesn't show up, go to the Windows Start Menu -> DevForce 2010 -> Tools -> OM Designer Extension Installer.

Hope this helps!


Posted By: jsobell
Date Posted: 04-Jul-2010 at 5:57pm
"What are you talking about dude. I'm not needing a visual studio for dummies lesson" :)

I think Ting is pointing out that it all happens automagically if you have IdeaBlade installed. By default (assuming the Extension Manager has IdeaBlade enabled) there will be a .tt file autmatically added by the extension to go with your .edmx file, and it will in turn automagically create all of the code you need at the server side.
Just make sure the 'Custom Tool' property of your edmx file is left blank (so VS2010 doesn't create its own entities using the EF4 framework templates).



Print Page | Close Window