Build support for EntityFramework

JonathanMitchellJonathanMitchell IEMember
edited May 2013 in Visual Studio

Building a console app on OSX 10.8 targeting EntityFramework 6.
EF 6 is referenced ok and the assembly is loaded.

The project contains an EDMX file generated in Visual Studio.
When the VS project was opened in XS the build action read EntityDeploy.
However the generated assembly did not contain the necessary csdl, ssdl and msl resources.
I set the EDMX build action to None and attempted to reset it to EntityDeploy, but this action was no longer available.

So:

  1. Does XS support the EntityDeploy action.
  2. If not, is the solution to manually embed the required csdl, ssdl and msl resources in the assembly.

Any suggestions appreciated.

Best Answer

Answers

  • JonathanMitchellJonathanMitchell IEMember

    Thanks for the confirmation.

    A bit of experimentation shows that the EF .csdl, .ssdl and .msl files can be included either as assembly resources or simply as files within the executable folder. The connection string has to be amended accordingly but EF 6 on Mono does find and access the resources.

  • ranjiticusranjiticus USMember

    Hello,

    I stumbled upon this trying to include a class lib that has an Entity Framework 5.0 context in it.

    Currently I get errors from System.Configuration 4.0.0.0 whenever I try to include a class lib dll that has EF dlls in it.

    Can you tell me how you got EF to work with the xamarin Android project?

    I see how the EF .csdl, .ssdl and .msl files, how do I include them in the android project assembly and utilize the data?

    Thanks

  • Hi

    We are using EF on OS X, not in an android project.

    To use the MSDL files etc simply build a connection string and and create a new ObjectContext using the connection string.

    http://msdn.microsoft.com/en-us/library/cc716756(v=vs.110).aspx

    J

Sign In or Register to comment.