SharePoint: Create managed metadata field programatically

The following piece of code creates a managed metadata column with internal name "BusinessLocation" and display name "Business Location"

using (SPSite site = new SPSite(""))
    using (SPWeb web = site.OpenWeb())
        TaxonomySession taxonomySession = new TaxonomySession(site);
        TermStore termStore = taxonomySession.TermStores["Managed Metadata Service"];
        Group group = termStore.Groups["Corporate Taxonomy"];
        TermSet termset = group.TermSets["Geography"];
        TaxonomyField taxonomyField = web.Fields.CreateNewField("TaxonomyFieldType", "BusinessLocation") as TaxonomyField;
        taxonomyField.Description = "Loction of business house.";
        taxonomyField.SspId = termStore.Id;
        taxonomyField.TermSetId = termset.Id;
        taxonomyField.AllowMultipleValues = false;
        taxonomyField.Group = "My Content Types";
        TaxonomyField field = site.RootWeb.Fields["BusinessLocation"] as TaxonomyField;
        field.Title = "Business Location";
profile for Nadeem Yousuf at SharePoint Stack Exchange, Q&A for SharePoint enthusiasts