Entity Framework

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
7/14/2011 9:22:13 AM
Gravatar
Total Posts 88

Entity Framework

Hi,

 

I´m starting with Entity framework in mojoportal solution.

I don't find any source how to use but i´m trying to create my EntityContext to access to all entities but its not working.

There any sample or documentation to search?

Thanks

7/14/2011 10:48:12 AM
Gravatar
Total Posts 18439

Re: Entity Framework

I think the main thing is you will need to add a connection string in the <connectionStrings section of Web.config to use Entity Framework whereas mojoPortal code uses a connection string from appSettings, Entity Framework expects it in the connectionStrings section.

Hope that helps,

Joe

7/15/2011 3:35:30 AM
Gravatar
Total Posts 88

Re: Entity Framework

hi,

 

Yes i´ve done that, but when i create the main object

mojoPortal.Data.EF.MSSQL.mojoEntities mj = new mojoPortal.Data.EF.MSSQL.mojoEntities();

when i go to all of this properties i can do something like that:

mj.Users.Find(); i only have mj.Users.

mojoEntities is like a DataContext? why i cant get all properties from entities?

Thanks

7/15/2011 5:28:45 AM
Gravatar
Total Posts 18439

Re: Entity Framework

If you want to use Entity Framework you should start from scratch, don't use anything from mojoPortal.Data.EF.MSSQL, that was just some code I was experimenting with last February, it is not working code intended for anyone to use.

Actually I thought you wanted to use EF for your own custom feature development, you should be able to do that but mojoPortal is not currently supporting EF for core features.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.