Trouble connecting F# to an Entity Framework model

  • Thread starter Thread starter Mr Yossu
  • Start date Start date
M

Mr Yossu

Guest
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.png

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...
 
Back
Top