lexdon / FSharpExamples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Type providers

What is a type provider?

  • A component that provides types, properties and methods for use in your program

Why is it cool?

  • It eliminates the barriers to working with diverse information sources found on the Internet and in modern enterprise environments

How does it do it?

  • By automatically generating the types, properties and methods needed to interact with different data sources

How does it differ from regular code generation?

  • Type providers are supported on the language and compiler level, removing the need to use external (e.g. IDE) tools

Some useful type providers

SQL

Comparison of SQL Type Providers

  • FSharp.Data.SqlClient - "Not you grandfather's ORM"
    • SqlCommandProvider - type-safe access to full set of T-SQL language
    • SqlProgrammabilityProvider - quick access to Sql Server functions, stored procedures and tables in idiomatic F# way
    • SqlEnumProvider - generates enumeration types based on static lookup data from any ADO.NET compliant source
  • SQLProvider
  • SqlDataConnection

Azure

Bonus: Using F# on Azure

Using F# on Azure

About


Languages

Language:F# 87.5%Language:C# 12.5%