<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Visual F# Team Blog</title><subtitle type="html">The blog of the F# team at Microsoft</subtitle><id>http://blogs.msdn.com/b/fsharpteam/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/fsharpteam/" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/b/fsharpteam/atom.aspx" /><generator uri="http://telligent.com" version="5.6.50428.7875">Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><updated>2013-02-05T01:08:00Z</updated><entry><title>F# on FreeBSD</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/fsharpteam/archive/2013/05/13/f-on-freebsd.aspx" /><id>http://blogs.msdn.com/b/fsharpteam/archive/2013/05/13/f-on-freebsd.aspx</id><published>2013-05-13T10:42:00Z</published><updated>2013-05-13T10:42:00Z</updated><content type="html">&lt;p&gt;Through &lt;a href="https://twitter.com/JKPappas"&gt;Jack Pappas&lt;/a&gt;, &lt;a href="http://fsharp.org"&gt;the F# Software Foundation&lt;/a&gt;&amp;nbsp;(the F# community group also known as &lt;a href="http://fsharp.org"&gt;fsharp.org&lt;/a&gt;) has recently &lt;a href="http://fsharp.org/use/freebsd/"&gt;made F# more readily available on FreeBSD&lt;/a&gt;. &amp;nbsp;Some details below, taken from the discussion on the &lt;a href="http://groups.google.com/group/fsharp-opensource"&gt;F# Open Source Google Group&lt;/a&gt;.&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;br /&gt;&lt;em&gt;Since my original post, I've been contacted by a few people who wanted to try F# on FreeBSD but didn't know how to set it up (or who ran into trouble when they tried). So, I spent a couple of hours last weekend writing up detailed instructions for installing Mono 3.0, F# 3.0, and emacs on FreeBSD, and they're now available on fsharp.org:&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;a href="http://fsharp.org/use/freebsd/"&gt;http://fsharp.org/use/freebsd/&lt;/a&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;I tested the instructions on a fresh installation of FreeBSD 9.1-RELEASE (32-bit) in VirtualBox on 64-bit Windows 7, and everything worked as it should. If you try the instructions -- and you should :) -- and run into problems, please start a new thread here on the mailing list and I'll help you get it fixed. (In this case, conversing on the mailing list is preferable so the solution is available to everyone.)&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;
&lt;p&gt;The Visual F# Team&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10418084" width="1" height="1"&gt;</content><author><name>dsyme</name><uri>http://blogs.msdn.com/dsyme/ProfileUrlRedirect.ashx</uri></author><category term="F# Programming" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/F_2300_+Programming/" /><category term="FSharp Programming" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/FSharp+Programming/" /><category term="F# Software Foundation" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/F_2300_+Software+Foundation/" /><category term="FreeBSD" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/FreeBSD/" /></entry><entry><title>F# for Machine Learning - a Gentle Introduction and Coding Dojo</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/fsharpteam/archive/2013/05/08/f-for-machine-learning-a-gentle-introduction-and-coding-dojo.aspx" /><id>http://blogs.msdn.com/b/fsharpteam/archive/2013/05/08/f-for-machine-learning-a-gentle-introduction-and-coding-dojo.aspx</id><published>2013-05-08T10:35:02Z</published><updated>2013-05-08T10:35:02Z</updated><content type="html">&lt;p&gt;If you're in the Bay Area, don't miss &lt;a href="http://www.meetup.com/sfsharp/events/115207492/"&gt;F# for Machine Learning - a Gentle Introduction and Coding Dojo&lt;/a&gt;&amp;nbsp;on Tuesday, May 14 at 6:00pm.&lt;/p&gt;
&lt;p&gt;The F# Software Foundation also have a collection of links about &lt;a href="http://fsharp.org/machine-learning/"&gt;F# and Machine Learning&lt;/a&gt;, as well as related topics including &lt;a href="http://fsharp.org/data-science/"&gt;F# and Data Science&lt;/a&gt;&amp;nbsp;and &lt;a href="http://fsharp.org/math/"&gt;F#&amp;nbsp;options for Maths and Statistics&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p style="font: 14px/19px verdana, arial, sans-serif; margin: 0px 0px 0.7em; padding: 0px 0px 0px 30px; text-align: left; color: #555555; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: #ffffff; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="font-size: small;"&gt;&lt;em&gt;Machine Learning is the art of writing programs that get better at&amp;nbsp;performing a task as they gain experience, without being explicitly&amp;nbsp;programmed to do so. Feed your program more data, and it will get&amp;nbsp;smarter at handling new situations.&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;em&gt;Some machine learning algorithms use fairly advanced math, but simple&amp;nbsp;approaches can be surprisingly effective. In this Session, we'll take&amp;nbsp;a classic Machine Learning challenge from Kaggle.com, automatically&amp;nbsp;recognizing hand-written digits&amp;nbsp;(&lt;a style="color: #2a9bc7; font-family: inherit; text-decoration: none; display: inline; cursor: pointer;" href="http://www.kaggle.com/c/digit-recognizer" target="_blank"&gt;http://www.kaggle.com/c/digit-recognizer&lt;/a&gt;), and build a classifier,&amp;nbsp;from scratch, using F#. So&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;strong style="font-family: inherit; font-weight: bold; display: inline;"&gt;bring your laptop&lt;/strong&gt;, and let's see how smart&amp;nbsp;we can make our machines!&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;em&gt;This session will be organized as an interactive workshop. Come over,&amp;nbsp;and learn yourself a Machine Learning and F# for great good! No prior&amp;nbsp;experience with Machine Learning required, and F# beginners are very&amp;nbsp;welcome - it will be a great opportunity to see F# in action, and why&amp;nbsp;it's awesome.&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: 14px/19px verdana, arial, sans-serif; margin: 0px 0px 0.7em; padding: 0px 0px 0px 30px; text-align: left; color: #555555; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: #ffffff; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="font-size: small;"&gt;&lt;em&gt;&lt;span style="font-family: inherit; display: inline;"&gt;To get the most from the session&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;strong style="font-family: inherit; font-weight: bold; display: inline;"&gt;please try and bring a laptop along with F# installed&lt;/strong&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;(ideally either MonoDevelop, Xamarin Studio&amp;nbsp;or Visual Studio Web Express/Full Edition).&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: 14px/19px verdana, arial, sans-serif; margin: 0px 0px 0.7em; padding: 0px 0px 0px 30px; text-align: left; color: #555555; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: #ffffff; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="font-size: small;"&gt;&lt;em&gt;&lt;span style="font-family: inherit; display: inline;"&gt;Note: we'll have pizzas and drinks for this event!&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: 14px/19px verdana, arial, sans-serif; margin: 0px 0px 0.7em; padding: 0px 0px 0px 30px; text-align: left; color: #555555; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: #ffffff; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="font-size: small;"&gt;&lt;em&gt;&lt;span style="font-family: inherit; display: inline;"&gt;&lt;a href="http://www.meetup.com/sfsharp/events/115207492/"&gt;Full details here&lt;/a&gt;, location &lt;/span&gt;&lt;/em&gt;&lt;a style="color: #2a9bc7; font-family: inherit; text-decoration: underline; display: inline; cursor: pointer;" title="" href="http://maps.google.com/maps?q=835+Market+St+Ste+700%2C+San+Francisco%2C+CA" target="_blank"&gt;Microsoft&lt;/a&gt;, 835 Market St Ste 700,&lt;span style="font-family: inherit; display: inline;"&gt;San Francisco&lt;/span&gt;,&lt;span style="font-family: inherit; display: inline;"&gt;CA&lt;/span&gt;&lt;span class="event-map-link" style="font-family: inherit; display: inline;"&gt;(&lt;a style="color: #2a9bc7; font-family: inherit; text-decoration: none; display: inline; cursor: pointer;" href="http://maps.google.com/maps?q=835+Market+St+Ste+700%2C+San+Francisco%2C+CA" target="_blank"&gt;map&lt;/a&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="font: 14px/19px verdana, arial, sans-serif; margin: 0px 0px 0.7em; padding: 0px 0px 0px 30px; text-align: left; color: #555555; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: #ffffff; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="font-size: small;"&gt;&lt;em&gt;&lt;span style="font-family: inherit; display: inline;"&gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10416948" width="1" height="1"&gt;</content><author><name>dsyme</name><uri>http://blogs.msdn.com/dsyme/ProfileUrlRedirect.ashx</uri></author><category term="F# Programming" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/F_2300_+Programming/" /><category term="F# Meetups" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/F_2300_+Meetups/" /><category term="Machine Learning" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/Machine+Learning/" /><category term="Kaggle" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/Kaggle/" /><category term="Data Science" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/Data+Science/" /></entry><entry><title>Seattle DotNet Startup Group: F# for Startups, Tuesday June 11 2013</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/fsharpteam/archive/2013/05/08/seattle-dotnet-startup-group-f-for-startups-tuesday-june-11-2013.aspx" /><id>http://blogs.msdn.com/b/fsharpteam/archive/2013/05/08/seattle-dotnet-startup-group-f-for-startups-tuesday-june-11-2013.aspx</id><published>2013-05-08T10:27:54Z</published><updated>2013-05-08T10:27:54Z</updated><content type="html">&lt;p&gt;&amp;nbsp;If you're in Seattle,&amp;nbsp;Redmond&amp;nbsp;or the Puget Sound Area, don't miss &lt;a href="http://www.meetup.com/DNSGroup/"&gt;the Seattle DotNet Startup Group&lt;/a&gt; session on &lt;a href="http://www.meetup.com/DNSGroup/events/118250832/"&gt;F# for Startups&lt;/a&gt;.&lt;/p&gt;
&lt;p style="margin: 0px 0px 0.7em; padding: 0px 0px 0px 30px; font-family: inherit; font-size: 1em;"&gt;&lt;img style="margin: 5px; padding: 0px; border: 0px currentColor; line-height: 0; float: right; max-height: 700px; max-width: 700px;" src="http://photos1.meetupstatic.com/photos/event/5/d/f/e/event_233784062.jpeg" alt="" /&gt;&lt;em&gt;&lt;span style="font-family: inherit; display: inline;"&gt;Joel Grus is Chief Scientist at VoloMetrix, where he develops and builds the algorithms for the core analytics platform (mostly in F#).&amp;nbsp; Previously he worked in data science roles at Decide, Bing, and Farecast.&amp;nbsp; He has degrees in math and economics, but he sort of wishes he'd studied computer science instead.&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin: 0px 0px 0.7em; padding: 0px 0px 0px 30px; font-family: inherit; font-size: 1em;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px 0px 0.7em; padding: 0px 0px 0px 30px; font-family: inherit; font-size: 1em;"&gt;&lt;em&gt;&lt;span style="font-family: inherit; display: inline;"&gt;Agenda:&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p style="margin: 0px 0px 0.7em; padding: 0px 0px 0px 30px; font-family: inherit; font-size: 1em;"&gt;&lt;em&gt;&lt;span style="font-family: inherit; display: inline;"&gt;6:00 - 6:45 PM: Pizza, beer &amp;amp; Networking&lt;br /&gt;6:45 - 7:00 PM: Intro &amp;amp; 15-seconds intros&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: inherit; display: inline;"&gt;7:00 - 7:45 PM: Joel Grus&lt;br /&gt;7:45 - 8:15 PM: Networking&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;div class="doc-content fixedWidthForIE " style="font: 12px/18px verdana, arial, sans-serif; padding: 16px 16px 4px 46px; border-radius: 3px 0px 0px; color: #555555; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; border-bottom-color: transparent; border-top-width: 0px; border-bottom-width: 1px; border-bottom-style: solid; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: #ffffff; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;
&lt;div id="event-content" class="event-section leading-top" style="padding-top: 12px; position: relative; z-index: 100;"&gt;&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10416946" width="1" height="1"&gt;</content><author><name>dsyme</name><uri>http://blogs.msdn.com/dsyme/ProfileUrlRedirect.ashx</uri></author><category term="F# Programming" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/F_2300_+Programming/" /><category term="F# Meetups" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/F_2300_+Meetups/" /><category term="F# Startups" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/F_2300_+Startups/" /><category term="VoloMetrix" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/VoloMetrix/" /><category term="Joel Grus" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/Joel+Grus/" /></entry><entry><title>F# and QuantLib: An Introduction </title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/fsharpteam/archive/2013/04/23/f-and-quantlib-an-introduction.aspx" /><id>http://blogs.msdn.com/b/fsharpteam/archive/2013/04/23/f-and-quantlib-an-introduction.aspx</id><published>2013-04-23T12:38:00Z</published><updated>2013-04-23T12:38:00Z</updated><content type="html">&lt;p&gt;A Guest Blog in conjunction with Alexandre Radicchi (&lt;a href="mailto:alex.radi@gmail.com"&gt;alex.radi@gmail.com&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;F# is an attractive language to use in Financial Engineering because of its functional-first methodology, succinctness, strong typing, data-integration, stability, maturity, tooling and performance, as well as its supported editions&amp;nbsp;in Visual Studio, its open-source edition, its cross-platform execution and its widespread availability. You can &lt;a href="http://www.tryfsharp.org/Learn/financial-computing"&gt;learn more about using F# for Financial Engineering through the excellent tutorials on Try F#&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.quantlib.org"&gt;QuantLib&lt;/a&gt; represents a unique project in the Financial Engineering panorama because of its maturity and of the vast quantity of tools implemented, all for free. In many situations it represents&amp;nbsp;a sensible&amp;nbsp;choice especially when starting a new project from scratch.&amp;nbsp; QuantLib is written in C++ but wrappers to many other languages exist. You can take a look at &lt;a href="http://www.quantlib.org"&gt;the project home page for further information&lt;/a&gt;. The majority of these wrappers are implemented using &lt;a href="http://www.swig.org"&gt;SWIG&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This blog post explores how to use F# in conjunction with QuantLib.&lt;/p&gt;
&lt;h3&gt;Preparing to access QuantLib&lt;/h3&gt;
&lt;p&gt;To access QuantLib on Windows we need two DLLs: &lt;strong&gt;NQuantLib.dll&lt;/strong&gt; (a .NET component) and &lt;strong&gt;NQuantLibc.dll&lt;/strong&gt; (a native component). If working in a financial institution these may already be available to you. If not, the native component is built from .lib files, in turn&amp;nbsp;built from&amp;nbsp;C++ source&amp;nbsp;and C++ header files:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://quantlib.org/install.shtml"&gt;Install Boost&lt;/a&gt; to get the .lib and header files Boost (or build the source in the official repositories for &lt;a href="http://www.boost.org/users/download"&gt;Boost&lt;/a&gt; or &lt;a href="http://www.boostpro.com/download"&gt;BoostPro&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;&lt;a href="http://quantlib.org/install.shtml"&gt;Get&amp;nbsp;and build QuantLib&lt;/a&gt;&amp;nbsp;&amp;nbsp;to build the .lib and header files for&amp;nbsp;QuantLib&amp;nbsp;(With VS2012, &lt;a href="http://quantcorner.wordpress.com/2012/11/13/installing-quantlib-for-vc11-windows/"&gt;see these instructions&lt;/a&gt;, and reportedly you may need &lt;a href="http://quantlib.10058.n7.nabble.com/quot-Unknown-Microsoft-compiler-quot-td8657.html"&gt;this fix to auto_link.hpp&lt;/a&gt;, see also the comment from pmcs below).&lt;/li&gt;
&lt;li&gt;Download the &lt;strong&gt;QuantLib-SWIG zip&lt;/strong&gt; file from the official repository (browse to the *other languages* directory on the QuantLib sourceforge repository).&lt;/li&gt;
&lt;li&gt;Download &lt;a href="http://www.swig.org"&gt;SWIG&lt;/a&gt; and setup your environment so that the swig executable is visible.&lt;/li&gt;
&lt;li&gt;Run the &lt;strong&gt;swig.cmd&lt;/strong&gt; file located on the QuantLib-SWIG\CSharp directory. This will generate the C++ wrapper file.&lt;/li&gt;
&lt;li&gt;Build &lt;strong&gt;NQuantLibc.dll&lt;/strong&gt; and &lt;strong&gt;NQuantLib.dll&lt;/strong&gt; using the given Visual Studio project.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Once done, place the &lt;strong&gt;NQuantLib.dll&lt;/strong&gt;&amp;nbsp;and &lt;strong&gt;NQuantLibc.dll&lt;/strong&gt; in a directory under your F# scripting directory called &lt;strong&gt;references&lt;/strong&gt;. If using a project then add NQuantLibc.dll as a file to the project and set to "Copy to Output" to "Copy if Newer"&lt;/p&gt;
&lt;p&gt;The steps are slightly different if you need to compile for Mono. The following these steps targets Ubuntu/Linux:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Download Boost, compile and install it (./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install) or install it from package (e.g. sudo apt-get install libboost).&lt;/li&gt;
&lt;li&gt;Install Swig using the package manager (sudo apt-get install swig) or download, compile and &lt;a href="http://www.swig.org"&gt;install it from sources&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Download QuantLib has seen before, uncompress it and launch ./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install.&lt;/li&gt;
&lt;li&gt;Download QuantLib-SWIG, uncompress it and launch ./configure &amp;amp;&amp;amp; make -C CSharp &amp;amp;&amp;amp; sudo make install.&lt;/li&gt;
&lt;li&gt;At this point you will end up with two libraries, the unmanaged one &lt;strong&gt;libNQuantLibc.so&lt;/strong&gt; and the Mono wrapper &lt;strong&gt;NQuantLib.dll&lt;/strong&gt;. As with the Windows libraries the managed extension must be able to invoke the unmanaged library.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Now let's F# QuantLib&lt;/h3&gt;
&lt;p&gt;Let's now compute something with our freshly compiled NQuantLib.dll.&lt;/p&gt;
&lt;p&gt;We start by doing some F# scriptin from Visual Studio (or MonoDevelop, or Xamarin Studio, or whatever text editor you want).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;When using F# Interactive you may need to set Tools --&amp;gt; Options --&amp;gt; F# Tools --&amp;gt; F# Interactive --&amp;gt; 64-bit --&amp;gt; False, or else build a 64-bit version of QuantLib.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In this first example we will create a simple &lt;strong&gt;QuantLib Date&lt;/strong&gt; object containing the today's date and send its ISO string representation to the standard output.&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;#I "references"&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;#r "NQuantLib.dll"&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;let date = QuantLib.Date.todaysDate()&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;printfn "today is: %s" (date.ISO())&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The output of this function on the fsharp interactive console is:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;today is: 2013-03-24&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Example 2: Pricing&amp;nbsp;a Strip of European Call Options&lt;/h3&gt;
&lt;p&gt;In the next example we write a more financially meaningful example by computing the prices of a strip of European Call options. First of all, we define a series of hypothetical market observables (the underlying asset spot price, its implied volatility,&amp;nbsp; a reference risk-free rate and a flat dividend yield) and then instantiate, for each strike, a *PlainVanillaPayoff* and a *BlackCalculator*. Then we call the *value* method which returns the price of each option.&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;open QuantLib&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;let T = 3.0&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;let r, divYield, vol = 0.01, 0.03, 0.5&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;let stdev = vol* sqrt T&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;let discount = exp (-r*T)&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;let spot = 100.0&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;let forward = spot * exp ((r-divYield)*T)&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;let strikes = [|10.0..10.0..200.0|]&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;for strike in strikes do&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; use payoff = new PlainVanillaPayoff(Option.Type.Call,strike)&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; use bcalculator = new BlackCalculator(payoff,forward,stdev,discount)&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printfn "strike: %.5f, price: %.5f" strike (bcalculator.value())&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The output of this script is:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strike: 10.0, price: 81.72475&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strike: 20.0, price: 72.48247&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strike: 30.0, price: 64.10232&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strike: 40.0, price: 56.71391&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strike: 50.0, price: 50.27881&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strike: 60.0, price: 44.69816&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strike: 70.0, price: 39.86036&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strike: 80.0, price: 35.65964&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strike: 90.0, price: 32.00237&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strike: 100.0, price: 28.80815&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strike: 110.0, price: 26.00889&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strike: 120.0, price: 23.54731&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strike: 130.0, price: 21.37533&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strike: 140.0, price: 19.45254&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strike: 150.0, price: 17.74493&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strike: 160.0, price: 16.22378&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strike: 170.0, price: 14.86477&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strike: 180.0, price: 13.64725&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strike: 190.0, price: 12.55360&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strike: 200.0, price: 11.56872&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This example is a simplification of reality in which we would use more complex structures such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;yield curves instead of flat yield/dividend rates;&lt;/li&gt;
&lt;li&gt;volatility surfaces instead of flat volatility value;&lt;/li&gt;
&lt;li&gt;multi-payment or Bermudian payoffs;&lt;/li&gt;
&lt;li&gt;multi-factorial models, and so on.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A lot of these features are already implemented into QuantLib and many of them are accessible through the .NET wrapper. See &lt;a href="http://quantlib.org/reference/index.html"&gt;the reference manual&lt;/a&gt;&amp;nbsp;for a full list of functionalities. You can also take a look at &lt;a href="https://sites.google.com/site/luigiballabio/qlbook"&gt;the Book&lt;/a&gt; which is a work in progress.&lt;/p&gt;
&lt;h3&gt;Example 3: Dates and Schedules&lt;/h3&gt;
&lt;p&gt;As a third example we use the &lt;strong&gt;Schedule&lt;/strong&gt; class which, given a set of rules and a calendar, generates a list of dates. In this particular example, we tell Schedule to generate the set of dates starting from &lt;strong&gt;2012-1-1&lt;/strong&gt; ending &lt;strong&gt;3 years later&lt;/strong&gt;&amp;nbsp;with a &lt;strong&gt;3 month&lt;/strong&gt; interval. The dates are rolled forward if they corresponds to non-business days on the &lt;strong&gt;Target&lt;/strong&gt; calendar.&lt;/p&gt;
&lt;p&gt;First we add an extension member to act as a helper when converting dates:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;open System&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;[&amp;lt;AutoOpen&amp;gt;]&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;module Conversion =&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; type DateTime with&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; member dt.AsQL = new Date(dt.ToOADate() |&amp;gt; int)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Now we set up our Schedule:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;let today = new DateTime(2012,1,1)&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;let startdate = today.AsQL&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;let enddate = today.AddYears(3).AsQL&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;let tenor = new QuantLib.Period("3M")&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;let convention = QuantLib.BusinessDayConvention.ModifiedFollowing&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;let termination = convention&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;let eomonth = false&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;let scheduler = new QuantLib.Schedule(startdate,&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enddate,tenor,new QuantLib.TARGET(),&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; convention,termination,&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; QuantLib.DateGeneration.Rule.Forward,&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; eomonth)&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;for i in [0u..scheduler.size()-1u] do&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printfn "date.[%d] = %s" i &amp;lt;| scheduler.date(i).ISO()&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The output of this script is&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date.[0] = 2012-01-02&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date.[1] = 2012-04-02&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date.[2] = 2012-07-02&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date.[3] = 2012-10-01&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date.[4] = 2013-01-02&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date.[5] = 2013-04-02&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date.[6] = 2013-07-01&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date.[7] = 2013-10-01&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date.[8] = 2014-01-02&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date.[9] = 2014-04-01&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date.[10] = 2014-07-01&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date.[11] = 2014-10-01&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date.[12] = 2015-01-02&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Using 'use'&lt;/h3&gt;
&lt;p&gt;Because QuantLib objects are generally native objects, you may need to use 'use' to ensure correct deterministic disposal of these objects. This doesn't apply so much to data scripting but more in project files. For example inside a function do this:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;use date = QuantLib.Date.todaysDate()&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Exploring Further&lt;/h3&gt;
&lt;p&gt;QuantLib contains a very large amount of functionality. An idea of the range of functionality can be seen from the following prefix of the tests run when building QuantLib. To explore further, see &lt;a href="http://quantlib.org/reference/index.html"&gt;the reference manual&lt;/a&gt; for a full list of functionalities or&amp;nbsp;&lt;a href="https://sites.google.com/site/luigiballabio/qlbook"&gt;the Book&lt;/a&gt;.&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;14&amp;gt;&amp;nbsp; Testing Barone-Adesi and Whaley approximation for American options...&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;14&amp;gt;&amp;nbsp; Testing Bjerksund and Stensland approximation for American options...&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;14&amp;gt;&amp;nbsp; Testing Ju approximation for American options...&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;14&amp;gt;&amp;nbsp; Testing finite-difference engine for American options...&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;14&amp;gt;&amp;nbsp; Testing finite-differences American option greeks...&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;14&amp;gt;&amp;nbsp; Testing finite-differences shout option greeks...&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;14&amp;gt;&amp;nbsp; Testing array construction...&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;14&amp;gt;&amp;nbsp; Testing analytic continuous geometric average-price Asians...&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;14&amp;gt;&amp;nbsp; Testing analytic continuous geometric average-price Asian greeks...&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;14&amp;gt;&amp;nbsp; Testing analytic discrete geometric average-price Asians...&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;14&amp;gt;&amp;nbsp; Testing analytic discrete geometric average-strike Asians...&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;14&amp;gt;&amp;nbsp; Testing Monte Carlo discrete geometric average-price Asians...&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;14&amp;gt;&amp;nbsp; Testing Monte Carlo discrete arithmetic average-price Asians...&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;14&amp;gt;&amp;nbsp; Testing Monte Carlo discrete arithmetic average-strike Asians...&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;14&amp;gt;&amp;nbsp; Testing discrete-averaging geometric Asian greeks...&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: courier new,courier;"&gt;...&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Summary&lt;/h3&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In summary, using F# with QuantLib is straight-forward once QuantLib is installed.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;QuantLib is the most advanced open source library for Financial Engineering;&lt;/li&gt;
&lt;li&gt;Interfacing it with F# is quite easy;&lt;/li&gt;
&lt;li&gt;We can potentially extend the set of exposed classes through SWIG;&lt;/li&gt;
&lt;li&gt;F# is well fitted for Financial applications.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Along the way, some routine code has to be written to instantiate QuantLib classes.&lt;/p&gt;
&lt;p&gt;We hope you enjoy using F# with QuantLib. If you are interested in connecting with other users of this combination, please email Alexandre, join &lt;a href="http://quantlib.org/reference/group.html"&gt;the QuantLib group&lt;/a&gt; and/or &lt;a href="http://fsharp.org"&gt;the F# Software Foundation&lt;/a&gt; and associated community groups.&lt;/p&gt;
&lt;p&gt;Don Syme and Alexandre Radicchi&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10413325" width="1" height="1"&gt;</content><author><name>dsyme</name><uri>http://blogs.msdn.com/dsyme/ProfileUrlRedirect.ashx</uri></author><category term="F# in Finance" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/F_2300_+in+Finance/" /><category term="Financial Engineering" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/Financial+Engineering/" /><category term="QuantLib" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/QuantLib/" /></entry><entry><title>F# + GPGPU - Financial Services Developer Forum (.NET in the City) - Thursday 16th May 2013</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/fsharpteam/archive/2013/04/17/f-gpgpu-financial-services-developer-forum-net-in-the-city-thursday-16th-may-2013.aspx" /><id>http://blogs.msdn.com/b/fsharpteam/archive/2013/04/17/f-gpgpu-financial-services-developer-forum-net-in-the-city-thursday-16th-may-2013.aspx</id><published>2013-04-17T14:42:00Z</published><updated>2013-04-17T14:42:00Z</updated><content type="html">&lt;p&gt;&lt;span style="color: #595959; font-family: 'Segoe UI','sans-serif'; font-size: 10.5pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-themecolor: text1; mso-themetint: 166; mso-style-textfill-fill-color: #595959; mso-style-textfill-fill-themecolor: text1; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-colortransforms: 'lumm=65000 lumo=35000'; mso-ansi-language: EN-GB; mso-bidi-language: AR-SA;"&gt;Join our Microsoft Developer Evangelist Team, and Financials Services Account team, &lt;/span&gt;&lt;span style="color: #595959; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-themecolor: text1; mso-themetint: 166; mso-style-textfill-fill-color: #595959; mso-style-textfill-fill-themecolor: text1; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-colortransforms: 'lumm=65000 lumo=35000'; mso-ansi-language: EN-GB; mso-bidi-language: AR-SA;"&gt;at the next Developers and Architects Forum for the Finance Sector. Come together to talk all things Microsoft and development with peers across the industry&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #595959; font-family: 'Segoe UI','sans-serif'; font-size: 10.5pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-themecolor: text1; mso-themetint: 166; mso-style-textfill-fill-color: #595959; mso-style-textfill-fill-themecolor: text1; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-colortransforms: 'lumm=65000 lumo=35000'; mso-ansi-language: EN-GB; mso-bidi-language: AR-SA;"&gt;&lt;span style="color: #595959; font-family: 'Segoe UI','sans-serif'; font-size: 10.5pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-themecolor: text1; mso-themetint: 166; mso-style-textfill-fill-color: #595959; mso-style-textfill-fill-themecolor: text1; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-colortransforms: 'lumm=65000 lumo=35000'; mso-ansi-language: EN-GB; mso-bidi-language: AR-SA;"&gt;This exclusive Microsoft event is aimed at Developers and Architects from the Financial Services sector, providing an opportunity to learn about some of the new developer capabilities, and best practices, designed to help drive leading edge Microsoft Applications&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;Combining the computational power of GPUs with the functional elegance of F#, Dr Daniel Egloff from QuantAlea (&lt;/span&gt;&lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-ansi-language: EN-GB; mso-bidi-language: AR-SA;"&gt;&lt;a href="http://www.quantalea.net"&gt;&lt;span style="color: #399afa; font-family: 'Segoe UI','sans-serif'; font-size: 10.5pt; mso-themecolor: hyperlink; mso-themetint: 166; mso-style-textfill-fill-color: #399AFA; mso-style-textfill-fill-themecolor: hyperlink; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-colortransforms: 'lumm=65000 lumo=35000';"&gt;&lt;span style="color: windowtext;"&gt;www.quantalea.net&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="color: #595959; font-family: 'Segoe UI','sans-serif'; font-size: 10.5pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-themecolor: text1; mso-themetint: 166; mso-style-textfill-fill-color: #595959; mso-style-textfill-fill-themecolor: text1; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-colortransforms: 'lumm=65000 lumo=35000'; mso-ansi-language: EN-GB; mso-bidi-language: AR-SA;"&gt;)&lt;/span&gt;&lt;span style="color: #595959; font-family: 'Segoe UI','sans-serif'; font-size: 10.5pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-themecolor: text1; mso-themetint: 166; mso-style-textfill-fill-color: #595959; mso-style-textfill-fill-themecolor: text1; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-colortransforms: 'lumm=65000 lumo=35000'; mso-ansi-language: EN-GB; mso-bidi-language: AR-SA;"&gt;will talk about, and demo, F#, building CUDA accelerated GPU applications by compiling F# code to an executable GPU code. Maximising application performance with GPU acceleration is a hot topic and Daniel has successfully applied F# on GPUs in productive systems for derivative pricing, risk calculations and statistical analysis.&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: large;"&gt;Register by emailing: &lt;a href="mailto:Roger.Davidson@microsoft.com"&gt;Roger.Davidson@microsoft.com&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-71/3817.part1.png"&gt;&lt;img style="margin-right: auto; margin-left: auto; display: block;" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-71/3817.part1.png" alt="" width="753" height="313" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-71/0488.part3.PNG"&gt;&lt;img style="margin-right: auto; margin-left: auto; display: block;" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-71/0488.part3.PNG" alt="" width="899" height="187" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10411885" width="1" height="1"&gt;</content><author><name>dsyme</name><uri>http://blogs.msdn.com/dsyme/ProfileUrlRedirect.ashx</uri></author><category term="F# Programming" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/F_2300_+Programming/" /><category term="GPGPU" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/GPGPU/" /><category term="Finance" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/Finance/" /></entry><entry><title>An Update to the F# Microsoft Dynamics CRM Type Provider Sample</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/fsharpteam/archive/2013/04/11/an-update-to-the-f-microsoft-dynamics-crm-type-provider-sample.aspx" /><id>http://blogs.msdn.com/b/fsharpteam/archive/2013/04/11/an-update-to-the-f-microsoft-dynamics-crm-type-provider-sample.aspx</id><published>2013-04-11T19:05:00Z</published><updated>2013-04-11T19:05:00Z</updated><content type="html">&lt;p style="margin-left: 36pt;"&gt;&lt;strong&gt;[&amp;nbsp;The CRM type provider sample is available as the &lt;a title="FSharpx.TypeProviders.Xrm" href="http://nuget.org/packages/FSharpx.TypeProviders.Xrm/"&gt;FSharpx.TypeProviders.Xrm&lt;/a&gt; NuGet package. The namespace has changed from "Samples" to "FSharpx" The updates below are in the process of being transferred into FSharpx package&amp;nbsp;]&lt;/strong&gt;&lt;/p&gt;
&lt;p style="margin-left: 36pt;"&gt;Part 1 -&amp;nbsp;&lt;a href="http://blogs.msdn.com/b/fsharpteam/archive/2013/02/14/the-f-microsoft-dynamics-crm-type-provider-sample-strongly-typed-enterprise-scale-customer-data-made-simple.aspx"&gt;The Microsoft Dynamics CRM Type Provider Sample&lt;/a&gt;&lt;br /&gt;Part 2 -&amp;nbsp;&lt;a href="http://blogs.msdn.com/b/fsharpteam/archive/2013/03/01/the-microsoft-dynamics-crm-type-provider-sample-static-parameters.aspx"&gt;The Microsoft Dynamics CRM Type Provider Sample - Static Parameters&lt;/a&gt;&lt;br /&gt;Part 3 - The Microsoft Dynamics CRM Type Provider Sample&amp;nbsp;- Updated Functionality&lt;/p&gt;
&lt;p&gt;An update of the Microsoft Dynamics CRM type provider sample is now available. The new features from this update are demonstrated below.&lt;/p&gt;
&lt;h2&gt;CRUD Operations&lt;/h2&gt;
&lt;p&gt;You are now able to create entities and set their attributes using the properties provided by the type provider. The OrganizationService instance is exposed so that you can pass entities to the relevant create / update / delete methods. You can create entities either by calling the Create method on the relevant entity set, or you can call the constructor of the provided entity type from within the XrmService type.&lt;/p&gt;
&lt;p style="margin-left: 36pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;let&lt;span style="color: black;"&gt; account = XRM.XrmService.account() &lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;let&lt;span style="color: black;"&gt; account2 = dc.accountSet.Create() &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;account.name &amp;lt;- &lt;span style="color: #a31515;"&gt;"John"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;account2.name &amp;lt;- &lt;span style="color: #a31515;"&gt;"Juan"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;account.accountid &amp;lt;- dc.OrganizationService.Create account &lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;account2.accountid &amp;lt;- dc.OrganizationService.Create account2 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;account.name &amp;lt;- &lt;span style="color: #a31515;"&gt;"Jean"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;dc.OrganizationService.Update account &lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;dc.OrganizationService.Delete(account.LogicalName,account.accountid) &lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt;"&gt;&lt;span style="background-color: white;"&gt;dc.OrganizationService.Delete(account2.LogicalName,account2.accountid)&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Explicit Joins&lt;/h2&gt;
&lt;p&gt;You are now able to use the standard join syntax in the query expressions. This syntax is not supported when combined with the select many syntax, you must choose one or the other for the query.&lt;/p&gt;
&lt;p&gt;&lt;br style="margin-left: 36pt;" /&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;let&lt;span style="color: black;"&gt; (contactName,accountName,leadName) = &lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;query&lt;span style="color: black;"&gt;{ &lt;span style="color: blue;"&gt;for&lt;span style="color: black;"&gt; a &lt;span style="color: blue;"&gt;in&lt;span style="color: black;"&gt; dc.accountSet &lt;span style="color: blue;"&gt;do&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; join&lt;span style="color: black;"&gt; c &lt;span style="color: blue;"&gt;in&lt;span style="color: black;"&gt; dc.contactSet &lt;span style="color: blue;"&gt;on&lt;span style="color: black;"&gt; (a.primarycontactid.Id = c.contactid) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; join&lt;span style="color: black;"&gt; l &lt;span style="color: blue;"&gt;in&lt;span style="color: black;"&gt; dc.leadSet &lt;span style="color: blue;"&gt;on&lt;span style="color: black;"&gt; (a.originatingleadid.Id = l.leadid) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select&lt;span style="color: black;"&gt; (c.fullname, a.name, l.fullname ) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt;"&gt;&lt;span style="background-color: white;"&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exactlyOne&lt;span style="color: black;"&gt; }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;There is no support for outer joins using this syntax &amp;ndash; the recommended approach is to use the select many syntax directly over the relationships where you can use the outer join operator (!!) if required.&lt;/p&gt;
&lt;h2&gt;Dot Individuals&lt;/h2&gt;
&lt;p&gt;All entity sets on the data context now have a new property named Individuals. This will return a type that contains a sample of the entities from the CRM system surfaced directly as properties. The name for each entity property is derived from the Primary Attribute as designated in the CRM metadata. You can adjust how many entities to load using the static parameter &lt;em&gt;IndividualsAmount&lt;/em&gt;, the default is 1000.&lt;/p&gt;
&lt;p style="margin-left: 36pt;"&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-71-metablogapi/7331.041113_5F00_1909_5F00_AnUpdatetot1.png" alt="" /&gt;&lt;/p&gt;
&lt;p style="margin-left: 36pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9pt;"&gt;&lt;span style="background-color: white;"&gt;let&lt;span style="color: black;"&gt; ben = dc.accountSet.Individuals.``Ben Smith`` &lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This feature can be extremely useful in data scripting scenarios or where a lot of static data exists in the CRM system, allowing for clearer and easier access to common entities.&lt;/p&gt;
&lt;h2&gt;Option Sets&lt;/h2&gt;
&lt;p&gt;Enumerations are now generated for CRM Option Sets on entities. These can be used directly in queries and CRUD operations.&lt;/p&gt;
&lt;p style="margin-left: 36pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 8pt; background-color: white;"&gt;query&lt;span style="color: black;"&gt; { &lt;span style="color: blue;"&gt;for&lt;span style="color: black;"&gt; a &lt;span style="color: blue;"&gt;in&lt;span style="color: black;"&gt; dc.contactSet &lt;span style="color: blue;"&gt;do&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 8pt; background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;where&lt;span style="color: black;"&gt; (a.accountrolecode = XRM.XrmService.contact_accountrolecode.``Decision Maker`` ) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 8pt;"&gt;&lt;span style="background-color: white;"&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select&lt;span style="color: black;"&gt; a } &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If you have nullable types switched on, you will not be able to use the F# nullable operators with the provided enumerations due to a restriction in the provider mechanism. Instead, you can use a standard operator on the Value property. The type provider will transform this into a safe expression containing a null check.&lt;/p&gt;
&lt;p style="margin-left: 36pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9pt;"&gt;&lt;span style="background-color: white;"&gt;where &lt;span style="color: black;"&gt;(c.accountrolecode.Value = XRM.XrmService.contact_accountrolecode.``Decision Maker``)&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Formatted Values&lt;/h2&gt;
&lt;p&gt;The contents of the underlying Microsoft.Xrm.Sdk.Entity.FormattedValues dictionary is now projected directly into a new type, accessed via the &lt;em&gt;Formatted&lt;/em&gt; property on the provided entity type. This type contains a string property for each attribute on the entity whose type can possibly have a formatted value. For example; Money, Dates, Integers and Option Sets are the most common. You can use the formatted values directly in the projection expression of a query.&lt;/p&gt;
&lt;p style="margin-left: 36pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;query&lt;span style="color: black;"&gt; { &lt;span style="color: blue;"&gt;for&lt;span style="color: black;"&gt; c &lt;span style="color: blue;"&gt;in&lt;span style="color: black;"&gt; dc.contactSet &lt;span style="color: blue;"&gt;do&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt;"&gt;&lt;span style="background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;select&lt;span style="color: black;"&gt; (c.address1_city,c.Formatted.accountrolecode) }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;You can also use the original underlying formatted values in a dynamic fashion by indexing the dictionary like normal&lt;/p&gt;
&lt;p style="margin-left: 36pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;query&lt;span style="color: black;"&gt; { &lt;span style="color: blue;"&gt;for&lt;span style="color: black;"&gt; c &lt;span style="color: blue;"&gt;in&lt;span style="color: black;"&gt; dc.contactSet &lt;span style="color: blue;"&gt;do&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt;"&gt;&lt;span style="background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;select&lt;span style="color: black;"&gt; (c.address1_city,c.FormattedValues.[&lt;span style="color: #a31515;"&gt;"accountrolecode"&lt;span style="color: black;"&gt;]) }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If you use the dynamic approach you should assert the existence of the key first &amp;ndash; the provided version handles this automatically and returns a blank string if the value does not exist.&lt;/p&gt;
&lt;p style="margin-left: 36pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;query&lt;span style="color: black;"&gt; { &lt;span style="color: blue;"&gt;for&lt;span style="color: black;"&gt; c &lt;span style="color: blue;"&gt;in&lt;span style="color: black;"&gt; dc.contactSet &lt;span style="color: blue;"&gt;do&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;select&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (c.address1_city, &lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&lt;span style="color: black;"&gt; c.FormattedValues.ContainsKey &lt;span style="color: #a31515;"&gt;"accountrolecode"&lt;span style="color: black;"&gt; &lt;span style="color: blue;"&gt;then&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.FormattedValues.[&lt;span style="color: #a31515;"&gt;"accountrolecode"&lt;span style="color: black;"&gt;] &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black;"&gt;&lt;span style="font-family: Consolas; font-size: 9pt; background-color: white;"&gt;&lt;span style="color: #a31515;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ""&lt;span style="color: black;"&gt;) }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Enumerating Relationships&lt;/h2&gt;
&lt;p&gt;Given an instance of an entity, you are now able to treat its relationships directly as sequences. The type provider will construct a query that uses the current entity ID as the primary or foreign key of the relationship and retrieves the results as normal.&lt;/p&gt;
&lt;p style="margin-left: 36pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;let&lt;span style="color: black;"&gt; lead = dc.leadSet.Individuals.``Diogo Andrade`` &lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: blue; font-family: Consolas; font-size: 9pt;"&gt;&lt;span style="background-color: white;"&gt;let&lt;span style="color: black;"&gt; accounts = lead.``1:N account_originating_lead`` |&amp;gt; Seq.toList&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In this case the relationship represents children. This code will always work because the query is using the primary key of lead to find matching children, and the primary key for an entity is always present no matter how you retrieve it. When enumerating a parent relationship, the related foreign key attribute must be present on the entity; otherwise the provider will not have enough information to retrieve the parent(s). For example, the following query works fine because no specific attributes were selected. The query returns all the entity's attributes including the foreign key we are interested in.&lt;/p&gt;
&lt;p style="margin-left: 36pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9pt;"&gt;&lt;span style="background-color: white;"&gt;let&lt;span style="color: black;"&gt; lead = dc.accountSet.Individuals.``Contoso Ltd``.``N:1 account_originating_lead`` |&amp;gt; Seq.exactlyOne&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The next query will not work, because the initial projection statement specifies the attribute &lt;em&gt;name&lt;/em&gt;, thus the provider only returns that single attribute for reasons of efficiency.&lt;/p&gt;
&lt;p style="margin-left: 36pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;let&lt;span style="color: black;"&gt; (name,acc) = &lt;span style="color: blue;"&gt;query&lt;span style="color: black;"&gt; { &lt;span style="color: blue;"&gt;for&lt;span style="color: black;"&gt; acc &lt;span style="color: blue;"&gt;in&lt;span style="color: black;"&gt; dc.accountSet &lt;span style="color: blue;"&gt;do&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;select&lt;span style="color: black;"&gt; (acc.name,acc)} |&amp;gt; Seq.head &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: blue; font-family: Consolas; font-size: 9pt;"&gt;&lt;span style="background-color: white;"&gt;let&lt;span style="color: black;"&gt; lead = acc.``N:1 account_originating_lead`` |&amp;gt; Seq.exactlyOne&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;For the subsequent query to work, the foreign key in question would need to be selected as well&lt;/p&gt;
&lt;p style="margin-left: 36pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;let&lt;span style="color: black;"&gt; (name,leadId,acc) = query { &lt;span style="color: blue;"&gt;for&lt;span style="color: black;"&gt; acc &lt;span style="color: blue;"&gt;in&lt;span style="color: black;"&gt; dc.accountSet &lt;span style="color: blue;"&gt;do&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select (acc.name,acc.originatingleadid,acc)} |&amp;gt; Seq.head &lt;/span&gt;&lt;br /&gt; &lt;span style="color: blue; font-family: Consolas; font-size: 9pt;"&gt;&lt;span style="background-color: white;"&gt;let&lt;span style="color: black;"&gt; lead = acc.``N:1 account_originating_lead`` |&amp;gt; Seq.exactlyOne&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;It is also possible to write new query expressions directly over the relationships of entity instances, assuming the above criteria is met.&lt;/p&gt;
&lt;p style="margin-left: 36pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;let&lt;span style="color: black;"&gt; cont = dc.contactSet.Individuals.``Brian Smith`` &lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;let&lt;span style="color: black;"&gt; (a,o,l) = &lt;span style="color: blue;"&gt;query&lt;span style="color: black;"&gt; { &lt;span style="color: blue;"&gt;for&lt;span style="color: black;"&gt; acc &lt;span style="color: blue;"&gt;in&lt;span style="color: black;"&gt; cont.``1:N account_primary_contact``&lt;span style="color: blue;"&gt;do&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;for&lt;span style="color: black;"&gt; lead &lt;span style="color: blue;"&gt;in&lt;span style="color: black;"&gt; acc.``N:1 account_originating_lead`` &lt;span style="color: blue;"&gt;do&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for&lt;span style="color: black;"&gt; owner &lt;span style="color: blue;"&gt;in&lt;span style="color: black;"&gt; acc.``N:1 owner_accounts`` &lt;span style="color: blue;"&gt;do&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where&lt;span style="color: black;"&gt; (l.firstname = &lt;span style="color: #a31515;"&gt;"Diogo"&lt;span style="color: black;"&gt;) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select&lt;span style="color: black;"&gt; (acc,owner,lead) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt;"&gt;&lt;span style="background-color: white;"&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exactlyOne&lt;span style="color: black;"&gt; }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Data Binding&lt;/h2&gt;
&lt;p&gt;Provided entities can now be bound to any .NET data binding system that makes use of &lt;em&gt;INotifyPropertyChanged&lt;/em&gt; and the &lt;em&gt;TypeDescriptor&lt;/em&gt;. There are two different data binding modes you can select from, accessed via the static parameter &lt;em&gt;DataBindingMode&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;NormalValues&lt;/em&gt; is the default mode. All entity attributes will appear as get/set properties to the binding mechanism, directly passing the underlying type of each attribute value. This means that you can use this mode to perform full create / update behaviour, however, whilst most basic types will work just fine, a lot of the attributes will have types such as &lt;em&gt;OptionSet&lt;/em&gt; and &lt;em&gt;EntityReference&lt;/em&gt; from the XRM SDK. You will need to customise the UI for these types if you want to properly read and modify them - the nature of this work depends on the binding component in question.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;FormattedValues&lt;/em&gt; is the other available binding mode. Entity attributes will appear as a mix of read/write properties for those that do not have formatted values associated with them, and read-only string properties for other attributes that do have formatted values. This means that types such as &lt;em&gt;OptionSet&lt;/em&gt; will show the actual string representation of the option set value; dates appear in localized time, and so forth. Because the formatted values are provided by the server and are always strings, providing the ability to modify them would not impact the underlying entity data &amp;ndash; therefore this mode is designed more for explorative code or an application which only needs to show data rather than modify it with a binding mechanism.&lt;/p&gt;
&lt;p&gt;The following code shows a complete F# interactive sample script that binds all the account entities to a DataGridView on a Windows Form.&lt;/p&gt;
&lt;p style="margin-left: 36pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;#r&lt;span style="color: black;"&gt; &lt;span style="color: #a31515;"&gt;@"microsoft.xrm.sdk.dll"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;#r&lt;span style="color: black;"&gt; &lt;span style="color: #a31515;"&gt;@"Samples.XrmProvider.dll"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;#r&lt;span style="color: black;"&gt; &lt;span style="color: #a31515;"&gt;"System.Runtime.Serialization"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;#r&lt;span style="color: black;"&gt; &lt;span style="color: #a31515;"&gt;"System.Windows.Forms"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;open&lt;span style="color: black;"&gt; Samples.XrmProvider &lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;open&lt;span style="color: black;"&gt; Samples.XrmProvider.Runtime.Common &lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;open&lt;span style="color: black;"&gt; System.Windows.Forms &lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;open&lt;span style="color: black;"&gt; System.ComponentModel &lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;type&lt;span style="color: black;"&gt; XRM = XrmDataProvider&amp;lt;&lt;span style="color: #a31515;"&gt;"http://server/org/XRMServices/2011/Organization.svc"&lt;span style="color: black;"&gt;,&lt;span style="color: blue;"&gt;false&lt;span style="color: black;"&gt;, &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataBindingMode=DataBindingMode.FormattedValues, &lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Username=&lt;span style="color: #a31515;"&gt;"usernamne"&lt;span style="color: black;"&gt;,Password=&lt;span style="color: #a31515;"&gt;"password"&lt;span style="color: black;"&gt;,Domain=&lt;span style="color: #a31515;"&gt;"domain"&lt;span style="color: black;"&gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;let&lt;span style="color: black;"&gt; dc = XRM.GetDataContext() &lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;let&lt;span style="color: black;"&gt; data = BindingList(Seq.toArray dc.accountSet) &lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;let&lt;span style="color: black;"&gt; form = &lt;span style="color: blue;"&gt;new&lt;span style="color: black;"&gt; Form(Text=&lt;span style="color: #a31515;"&gt;"CRM Accounts"&lt;span style="color: black;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;let&lt;span style="color: black;"&gt; dg = &lt;span style="color: blue;"&gt;new&lt;span style="color: black;"&gt; DataGridView(Dock = DockStyle.Fill,DataSource=data) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;form.Controls.Add dg &lt;/span&gt;&lt;br /&gt; &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;form.Show() &lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-71-metablogapi/6663.041113_5F00_1909_5F00_AnUpdatetot2.png" alt="" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10410403" width="1" height="1"&gt;</content><author><name>Visual Studio FSharp Team</name><uri>http://blogs.msdn.com/FsharpTeam/ProfileUrlRedirect.ashx</uri></author><category term="F# Programming" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/F_2300_+Programming/" /><category term="F# 3.0" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/F_2300_+3-0/" /><category term="FSharp Programming" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/FSharp+Programming/" /><category term="Information-rich Programming" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/Information_2D00_rich+Programming/" /><category term="XRM" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/XRM/" /><category term="Microsoft Dynamics CRM" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/Microsoft+Dynamics+CRM/" /><category term="Type providers" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/Type+providers/" /></entry><entry><title>The Microsoft Dynamics CRM Type Provider Sample: Static Parameters</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/fsharpteam/archive/2013/03/01/the-microsoft-dynamics-crm-type-provider-sample-static-parameters.aspx" /><id>http://blogs.msdn.com/b/fsharpteam/archive/2013/03/01/the-microsoft-dynamics-crm-type-provider-sample-static-parameters.aspx</id><published>2013-03-01T16:01:00Z</published><updated>2013-03-01T16:01:00Z</updated><content type="html">&lt;p&gt;&lt;strong&gt;[ Update: the CRM type provider is now available as the &lt;a title="FSharpx.TypeProviders.Xrm" href="http://nuget.org/packages/FSharpx.TypeProviders.Xrm/"&gt;FSharpx.TypeProviders.Xrm&lt;/a&gt; NuGet package. The namespace has changed from "Samples" to "FSharpx" ]&lt;/strong&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;Part 1 -&amp;nbsp;&lt;a href="http://blogs.msdn.com/b/fsharpteam/archive/2013/02/14/the-f-microsoft-dynamics-crm-type-provider-sample-strongly-typed-enterprise-scale-customer-data-made-simple.aspx"&gt;The Microsoft Dynamics CRM Type Provider Sample&lt;/a&gt;&lt;br /&gt;Part 2 -&amp;nbsp;The Microsoft Dynamics CRM Type Provider Sample -&amp;nbsp;Static Parameters&lt;br /&gt;Part 3 - &lt;a href="http://blogs.msdn.com/b/fsharpteam/archive/2013/04/11/an-update-to-the-f-microsoft-dynamics-crm-type-provider-sample.aspx"&gt;The Microsoft Dynamics CRM Type Provider Sample&amp;nbsp;- Updated Functionality&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The CRM Type Provider Sample in the F# 3.0 Sample Pack supports several interesting static parameters that determine how CRM is integrated into the F# programming language.&lt;/p&gt;
&lt;p&gt;The parameters are as follows:&lt;/p&gt;
&lt;div&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 205px;" /&gt;&lt;col style="width: 205px;" /&gt;&lt;col style="width: 205px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;OrganizationServiceUrl&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid 0.5pt; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;The service URL for the CRM Organization Service&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid 0.5pt; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;(required)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;UseNullableValues&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;When true, attributes in CRM that are not required will be surfaced as Nullable&amp;lt;'T&amp;gt;. When false, all value-type, non required attributes will be returned as Unchecked.defaultOf&amp;lt;'T&amp;gt; whether they exist or not&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;default: &lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;false&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;RelationshipNamingType&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Determines the naming convention of relationship properties used on entity types&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;default: &lt;span style="color: black; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;ParentChildPrefix&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;CrmOnline&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;When true, Windows Live authentication will be used, allowing access to CRM Online deployments&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;default: &lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;false&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;CredentialsFile&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Path to a plain text file that includes username, password and optionally the domain. In the case of CRM Online these would be the relevant Windows Live username and password&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;default: &lt;span style="color: #a31515; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;""&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Username &lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Can be used in explorative scripting scenarios instead of a credentials file&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;default: &lt;span style="color: #a31515; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;""&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Password &lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Can be used in explorative scripting scenarios instead of a credentials file&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;default: &lt;span style="color: #a31515; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;""&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Domain &lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Can be used in explorative scripting scenarios instead of a credentials file&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;default: &lt;span style="color: #a31515; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;""&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;IndividualsAmount&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;The maximum number of sample individuals for each CRM entity set&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;default: &lt;span style="font-family: Consolas; font-size: 9pt; background-color: white;"&gt;1000&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;DataBindingMode&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Controls the behaviour of data bound entities&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;default: &lt;span style="font-family: Consolas; font-size: 9pt; background-color: white;"&gt;NormalValues&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Some further rules of the authentication configuration are as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you do not supply credentials, Active Directory will be used for authentication. Where at all possible, this is the recommended approach.&lt;/li&gt;
&lt;li&gt;At runtime, you are able to pass in a different service endpoint and / or credentials by using the various GetDataContext method overloads.&lt;/li&gt;
&lt;li&gt;In a compiled application, passing credentials as static parameters will always require you to supply them again in the GetDataContext method. This is to ensure no credentials appear in the resulting binaries. This restriction does not apply whilst working in F# interactive.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;If you require credentials as static parameters, but would like to use Active Directory at runtime, you can pass blank strings for username, password and domain into the GetDataContext method.&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Of the static parameters only the service URL is required. You can supply others you need with the named parameter syntax:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;type&lt;span style="color: black;"&gt; Xrm = XrmDataProvider&amp;lt;&lt;span style="color: #a31515;"&gt;"http://server/org/XRMServices/2011/Organization.svc"&lt;span style="color: black;"&gt;, CredentialsFile=&lt;span style="color: #a31515;"&gt;"Credentials.txt"&lt;span style="color: black;"&gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"&gt;let&lt;span style="color: black;"&gt; dc = Xrm.GetDataContext()&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10398542" width="1" height="1"&gt;</content><author><name>Visual Studio FSharp Team</name><uri>http://blogs.msdn.com/FsharpTeam/ProfileUrlRedirect.ashx</uri></author><category term="F# Programming" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/F_2300_+Programming/" /><category term="F# 3.0" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/F_2300_+3-0/" /><category term="FSharp Programming" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/FSharp+Programming/" /><category term="Information-rich Programming" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/Information_2D00_rich+Programming/" /><category term="XRM" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/XRM/" /><category term="Microsoft Dynamics CRM" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/Microsoft+Dynamics+CRM/" /><category term="Type providers" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/Type+providers/" /></entry><entry><title>The F# 3.0 Microsoft Dynamics CRM Type Provider Sample - Strongly-typed enterprise-scale customer data made simple</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/fsharpteam/archive/2013/02/14/the-f-microsoft-dynamics-crm-type-provider-sample-strongly-typed-enterprise-scale-customer-data-made-simple.aspx" /><id>http://blogs.msdn.com/b/fsharpteam/archive/2013/02/14/the-f-microsoft-dynamics-crm-type-provider-sample-strongly-typed-enterprise-scale-customer-data-made-simple.aspx</id><published>2013-02-14T16:28:00Z</published><updated>2013-02-14T16:28:00Z</updated><content type="html">&lt;p&gt;&lt;strong&gt;[ Update: the CRM type provider is now available as the &lt;a title="FSharpx.TypeProviders.Xrm" href="http://nuget.org/packages/FSharpx.TypeProviders.Xrm/"&gt;FSharpx.TypeProviders.Xrm&lt;/a&gt; NuGet package. The namespace has changed from "Samples" to "FSharpx" ]&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;Part 1 -&amp;nbsp;The Microsoft Dynamics CRM Type Provider Sample&lt;br /&gt;Part 2 -&lt;a href="http://blogs.msdn.com/b/fsharpteam/archive/2013/03/01/the-microsoft-dynamics-crm-type-provider-sample-static-parameters.aspx"&gt;&amp;nbsp;The Microsoft Dynamics CRM Type Provider Sample -&amp;nbsp;Static Parameters&lt;/a&gt;&lt;br /&gt;Part 3 - &lt;a href="http://blogs.msdn.com/b/fsharpteam/archive/2013/04/11/an-update-to-the-f-microsoft-dynamics-crm-type-provider-sample.aspx"&gt;The Microsoft Dynamics CRM Type Provider Sample&amp;nbsp;- Updated Functionality&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We're pleased to announce that a new type provider sample has been added to &lt;a href="http://fsharp3sample.codeplex.com/"&gt;&lt;span style="color: #00749e;"&gt;the F# 3.0 Sample Pack&lt;/span&gt;&lt;/a&gt;: the Microsoft Dynamics CRM 2011 type provider. For those in a hurry, you can &lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-71/6786.Query_5F00_only.wmv"&gt;watch a short screencast &lt;/a&gt;&lt;span style="color: #00749e;"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-71/6786.Query_5F00_only.wmv"&gt;here&lt;/a&gt;&lt;/span&gt;(a longer version is in the works).&lt;/p&gt;
&lt;p&gt;This sample uses the F# 3.0 Type Provider mechanism to provide scalable access to strongly typed CRM entities without the need for code generation. You can read more about the various kinds of Type Providers &lt;a href="http://msdn.microsoft.com/en-us/library/hh156509.aspx"&gt;&lt;span style="color: #00749e;"&gt;here&lt;/span&gt;&lt;/a&gt; and check out the other samples in the samples pack. A technical report on F# type providers called &lt;a href="http://blogs.msdn.com/b/dsyme/archive/2012/09/21/new-tech-report-from-microsoft-research-strongly-typed-language-support-for-internet-scale-information-sources.aspx"&gt;&lt;span style="color: #00749e;"&gt;&lt;em&gt;Strongly-Typed Language Support for Internet-Scale Information Sources&lt;/em&gt;&lt;/span&gt;&lt;/a&gt;is available from Microsoft Research.&lt;/p&gt;
&lt;p&gt;A default install of Microsoft Dynamics CRM 2011 contains a wealth of schematized data tables pertaining to the customer relations of a business. Additionally, the product suite allows the default data schema to be extended and heavily customised. This means Microsoft Dynamics CRM is frequently used to model the custom domain requirements of particular enterprises. From a developer perspective, the data can be accessed in a dynamic fashion using the CRM Organization Service with a &lt;a href="http://msdn.microsoft.com/en-us/library/gg328300.aspx"&gt;&lt;span style="color: #00749e;"&gt;&lt;em&gt;QueryExpression&lt;/em&gt;&lt;/span&gt;&lt;/a&gt;&lt;em&gt; &lt;/em&gt;or &lt;a href="http://msdn.microsoft.com/en-us/library/gg328117.aspx"&gt;&lt;span style="color: #00749e;"&gt;&lt;em&gt;FetchXml&lt;/em&gt;&lt;/span&gt;&lt;/a&gt;. Later versions of CRM introduced a &lt;a href="http://msdn.microsoft.com/en-us/library/gg328328.aspx"&gt;&lt;span style="color: #00749e;"&gt;LINQ provider&lt;/span&gt;&lt;/a&gt; over the QueryExpression which works effectively but requires a large amount of generated code in order to function. The problems caused by this generated code can be very significant for CRM programming teams, even to the point where schema changes are avoided because of the need to regenerate massive code files.&lt;/p&gt;
&lt;p&gt;The vision we are pursuing with this work is that someone working with Microsoft Dynamic CRM data should experience the same &lt;em&gt;immediate&lt;/em&gt;, &lt;em&gt;simple&lt;/em&gt;, &lt;em&gt;scalable&lt;/em&gt; and &lt;em&gt;intuitive&lt;/em&gt; access to massive enterprise schemas as we have achieved with many other &lt;a href="http://blogs.msdn.com/b/dsyme/archive/2013/01/30/twelve-type-providers-in-pictures.aspx"&gt;&lt;span style="color: #00749e;"&gt;data sources.&lt;/span&gt;&lt;/a&gt; Wouldn't it be nice if the various entities in CRM were automatically at your fingertips in a strongly typed fashion, and didn't require large amounts of generated code? Wouldn't it be nice if changes in the data schema would automatically reflect into programs and data scripts, removing the possibility of runtime errors due to mismatched code and data schema? This, amongst other nice features, is what this F# 3.0 type provider gives you.&lt;/p&gt;
&lt;p&gt;To get going with this sample, you will first need a fully functioning CRM deployment and access to the OrganizationService endpoint. We understand that many of you won't have this, so you can also watch the screencast linked above to see the type provider sample in action. (The following steps assume the client is on the same domain as the service; if this is not the case, please see later blog posts on &lt;em&gt;static parameters&lt;/em&gt; to address this)&lt;/p&gt;
&lt;p&gt;To get going with the sample&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You will need the &lt;a href="http://www.microsoft.com/en-gb/download/details.aspx?id=17331"&gt;&lt;span style="color: #00749e;"&gt;Mircrosoft Identity Foundation&lt;/span&gt;&lt;/a&gt; in order to query the organization service (In Windows Server 2012 and Windows 8 this can be installed via "Add Windows Features")&lt;/li&gt;
&lt;li&gt;Install F# 3.0, either through &lt;a href="http://www.microsoft.com/visualstudio/eng/downloads"&gt;&lt;span style="color: #00749e;"&gt;an evaluation copy of Visual Studio 2012&lt;/span&gt;&lt;/a&gt; or using the &lt;a href="http://blogs.msdn.com/b/fsharpteam/archive/2012/09/12/announcing-the-release-of-f-tools-for-visual-studio-express-2012-for-web.aspx"&gt;&lt;span style="color: #00749e;"&gt;Free F# Tools for Visual Studio 2012 Web Express&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Download and unzip &lt;a href="http://fsharp3sample.codeplex.com/SourceControl/list/changesets"&gt;&lt;span style="color: #00749e;"&gt;the latest HEAD copy of the F# 3.0 Sample Pack&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Go to SampleProviders\Samples.Xrm. Open and build Samples. Xrm.Provider.sln&lt;/li&gt;
&lt;li&gt;Create a new script referencing &lt;span style="color: #424242;"&gt;&lt;strong&gt;Samples.XrmProvider.dll&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p style="font-family: Courier New;"&gt;&lt;span style="color: #424242;"&gt;#r &lt;span style="color: #a31515;"&gt;@"System.Runtime.Serializaation"&lt;span style="color: #424242;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #424242;"&gt;#r &lt;span style="color: #a31515;"&gt;@"lib\Microsoft.Xrm.Sdk.dll"&lt;span style="color: #424242;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #424242;"&gt;#r &lt;span style="color: #a31515;"&gt;@"bin\Debug\Samples.XrmProvider.dll"&lt;span style="color: #424242;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="color: blue;"&gt;open &lt;span style="color: #424242;"&gt;Samples.XrmProvider&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="color: blue;"&gt;let&lt;span style="color: #424242;"&gt; xrm = &lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #424242;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;XrmDataProvider&amp;lt;&lt;span style="color: #a31515;"&gt;"http://server/org/XRMServices/2011/Organization.svc"&lt;span style="color: #424242;"&gt;&amp;gt;.GetDataContext() &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: blue;"&gt;let&lt;span style="color: #424242;"&gt;&amp;nbsp;accounts = xrm.accountSet |&amp;gt; Seq.toList&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Assuming everything has gone as intended, you will now have retrieved all the Account entities from the organization in just 2 lines of code! &lt;em&gt;(Perhaps don't try this if you have millions of accounts..) &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;You can now use &lt;a href="http://msdn.microsoft.com/en-us/library/hh225374(v=VS.110).aspx"&gt;&lt;span style="color: #00749e;"&gt;&lt;em&gt;F#&lt;/em&gt; &lt;em&gt;Query Expressions&lt;/em&gt;&lt;/span&gt;&lt;/a&gt;&lt;em&gt; &lt;/em&gt;to create LINQ queries over the data. The provider currently supports a subset of the LINQ query operations and a few of the F# specific query expression keywords, with more to come in future releases. More information on building queries will be detailed in later blog posts. Additionally, you can look at the test project for to get a feel for different query compositions.&lt;/p&gt;
&lt;p style="font-family: Courier New;"&gt;&lt;span style="color: blue;"&gt;let&lt;span style="color: #424242;"&gt;&amp;nbsp;accounts = &lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #424242;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;query { &lt;span style="color: blue;"&gt;for&lt;span style="color: #424242;"&gt; a in xrm.accountSet do &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #424242;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;where&lt;span style="color: #424242;"&gt; (a.name.Contains &lt;span style="color: #a31515;"&gt;"Contoso"&lt;span style="color: #424242;"&gt;) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: #424242;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;select&lt;span style="color: #424242;"&gt; a } |&amp;gt; Seq.toList &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Some cool things implemented by the new sample include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Standard LINQ functionality including filtering, projections, sorting, distinct&lt;/li&gt;
&lt;li&gt;Paging via Skip and Take&lt;/li&gt;
&lt;li&gt;Opt-in nullable values on appropriate CRM attributes and support for &lt;a href="http://msdn.microsoft.com/en-us/library/hh370984.aspx"&gt;&lt;span style="color: #00749e;"&gt;&lt;em&gt;F# Nullable operators&lt;/em&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Entity relationships can be queried without having to use explicit joins or know which attributes to join on&lt;/li&gt;
&lt;li&gt;Support for many-to-many relationships&lt;/li&gt;
&lt;li&gt;Custom operators allow you to use CRM conditional operators such as In and Not In&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some limitations of the provider are as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Many to many relationships to/from the same entity type are not implemented&lt;/li&gt;
&lt;li&gt;Aggregation operations are not implemented&lt;/li&gt;
&lt;li&gt;There are some restrictions with the way parents / children can be selected (more on this in later posts)&lt;/li&gt;
&lt;li&gt;A connection to the organization service is required during compilation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here is a screenshot using IntelliSense to explore an account entity.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-71-metablogapi/5618.021513_5F00_2022_5F00_TheFMicroso1.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;We hope you enjoy the sample and learn a lot from it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10393718" width="1" height="1"&gt;</content><author><name>Visual Studio FSharp Team</name><uri>http://blogs.msdn.com/FsharpTeam/ProfileUrlRedirect.ashx</uri></author><category term="F# Programming" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/F_2300_+Programming/" /><category term="F# 3.0" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/F_2300_+3-0/" /><category term="FSharp Programming" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/FSharp+Programming/" /><category term="Information-rich Programming" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/Information_2D00_rich+Programming/" /><category term="XRM" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/XRM/" /><category term="Microsoft Dynamics CRM" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/Microsoft+Dynamics+CRM/" /><category term="Type providers" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/Type+providers/" /></entry><entry><title>F# + ServiceStack - F# Web Services on any platform in and out of a web server</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/fsharpteam/archive/2013/02/06/f-servicestack-f-web-services-on-any-platform-in-and-out-of-a-web-server.aspx" /><id>http://blogs.msdn.com/b/fsharpteam/archive/2013/02/06/f-servicestack-f-web-services-on-any-platform-in-and-out-of-a-web-server.aspx</id><published>2013-02-06T11:58:00Z</published><updated>2013-02-06T11:58:00Z</updated><content type="html">&lt;p&gt;Demis Bellot has two excellent articles on using F# with &lt;a href="http://www.servicestack.net"&gt;ServiceStack&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;nbsp;&lt;a href="http://www.servicestack.net/mythz_blog/?p=785"&gt;F# Web Services on any platform in and out of a web server&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.servicestack.net/mythz_blog/?p=811"&gt;Async, Cached Twitter API Proxy in F#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;To quote:&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;em&gt;You now have a fully-fledged ServiceStack ASP.NET application that can be hosted in any ASP.NET compatible web server e.g:&lt;/em&gt;&lt;/p&gt;
&lt;ul style="padding-left: 30px;"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;IIS&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Apache + mod_mono&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Nginx + MonoFastCGI&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;XSP&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;WebDevServer.exe&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;em&gt;Now that you know how to create functional F# web services, you can read more about the goodies you get for free when using Service Stack, complete with live links to all those juicy XML, JSON, SOAP, HTML, CSV and JSV Formats check out: &lt;a href="http://www.servicestack.net/ServiceStack.Hello/"&gt;http://www.servicestack.net/ServiceStack.Hello/&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;Enjoy!&lt;/div&gt;
&lt;div&gt;Don, for the Visual F# team&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10391492" width="1" height="1"&gt;</content><author><name>dsyme</name><uri>http://blogs.msdn.com/dsyme/ProfileUrlRedirect.ashx</uri></author><category term="F# Programming" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/F_2300_+Programming/" /><category term="ASP.NET Web API" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/ASP-NET+Web+API/" /><category term="REST" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/REST/" /><category term="ServiceStack" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/ServiceStack/" /><category term="IIS" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/IIS/" /><category term="Mono" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/Mono/" /></entry><entry><title>Learn How to Create an Internet Game Using F#, C#, and ASP.NET</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/fsharpteam/archive/2013/02/05/learn-how-to-create-an-internet-game-using-f-c-and-asp-net.aspx" /><id>http://blogs.msdn.com/b/fsharpteam/archive/2013/02/05/learn-how-to-create-an-internet-game-using-f-c-and-asp-net.aspx</id><published>2013-02-05T01:08:00Z</published><updated>2013-02-05T01:08:00Z</updated><content type="html">&lt;p&gt;We have just released a new MSDN sample and tutorial that shows &lt;a href="http://msdn.microsoft.com/en-us/library/jj865569.aspx"&gt;how to use F# and C# in a Windows Azure cloud service&lt;/a&gt;. If you are&amp;nbsp;interested in&amp;nbsp;cloud programming with F# or any other language, we encourage you try out the sample!&lt;/p&gt;
&lt;p&gt;The sample is a crossword game called WordGrid, which is reminiscent of Scrabble, Words with Friends and similar games. It shows some basic concepts&amp;nbsp;of&amp;nbsp;cloud programming in F#, such as using Windows Azure queues in F#, and using type providers to access a Windows Azure SQL database.&amp;nbsp; It also demonstrates how you might use F# and C# together in an ASP.NET MVC 4 web role.&lt;/p&gt;
&lt;p&gt;Get started with an overview and setup instructions &lt;a href="http://msdn.microsoft.com/en-us/library/jj865569.aspx"&gt;here&lt;/a&gt;, and dive into the code by reviewing the article &lt;a href="http://msdn.microsoft.com/en-us/library/jj906431.aspx"&gt;here&lt;/a&gt;. You can find the sample code itself on &lt;a href="http://wordgrid.codeplex.com/"&gt;CodePlex&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;
&lt;p&gt;Gordon and Donna, for the Visual F# Team&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10391051" width="1" height="1"&gt;</content><author><name>Visual Studio FSharp Team</name><uri>http://blogs.msdn.com/FsharpTeam/ProfileUrlRedirect.ashx</uri></author><category term="F# Programming" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/F_2300_+Programming/" /><category term="F# 3.0" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/F_2300_+3-0/" /><category term="F#" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/F_2300_/" /><category term="ASP.NET" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/ASP-NET/" /><category term="CodePlex" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/CodePlex/" /><category term="F# Samples" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/F_2300_+Samples/" /><category term="Windows Azure" scheme="http://blogs.msdn.com/b/fsharpteam/archive/tags/Windows+Azure/" /></entry></feed>