Implementing the "actual data processing" in F# is perhaps the most common use of F# currently, so implementing the business logic in F# seems like a good choice.
I don't think that you'll be able to use Entity Framework (easily) directly from F#, so you'll need to use C# to generate the data model and expose relevant data to F#. If you wanted to use LINQ to SQL then you can just generate the mapping in C# and write queries in F# using PowerPack (as Mitya suggests).
Perhaps the easiest thing to do would be to have three projects:
Data access layer in C# that simply uses Entity Framework and exposes the important data (using the IEnumerable
type, which can be easily consumed from F#).
Business layer in F# that uses the data, performs the "actual processing" and exposes a couple of types that can be used from C#. If you declare a class in F# then it will be compiled just like any normal .NET class, so you can easily use it from C#. You just need to be careful not to use F# specific features in the public interface. A couple of suggestions would be to use delegates (instead of functions), class types and IEnumerable
(called seq
in F#) instead of functional lists.
User interface layer in C# that calls the types declared in F#. If you follow the simple rules above, then the C# code can easily call F# types.
As a side note - even though F# doesn't support designers, it can be quite great for user interface programming (see for example this article or my talk about Silverlight in F#). One thing you could do is to create your user interface in a C# library project, mark everything as public and then reference it from an F# project that actually controls the user interaction. However, this is a bit more advanced, so I think that starting with the business layer is a good idea.