Jump to content
Xtreme .Net Talk

Trouble connecting F# to an Entity Framework model


Recommended Posts

Guest Mr Yossu
Posted

Hello,

 

I've been trying out this MSDN walkthrough to connect F# to an edmx file. I started an empty solution, and added a C# class library, to which I added an Entity Framework model. I then added an F# console app to the solution. My solution now looked like this...

 

774202

 

Following what was in that MSDN article, I added the following line to my F# code file...

 

type edmx = EdmxFile<"DonationsManagerModel.edmx", ResolutionFolder = @"..\EfModel">

 

However, the type name is underlined in red, and I get the error message...

 

The provided types generated by this use of a type provider may not be used from other F# assemblies and should be marked internal or private. Consider using 'type internal TypeName = ...' or 'type private TypeName = ...'.

 

I've been searching, but haven't managed to find anything that I understand that would help solve this. Anyone any ideas?

 

Thanks

 


 

 

FREE custom controls for Lightswitch! A collection of useful controls for Lightswitch developers (Silverlight client only). Download from the Visual Studio Gallery.

 

If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at http://dotnetwhatnot.pixata.co.uk/

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...