我正在撰写一份注定要成为Azure功能的销售报告.使用FSharp.Data.TypeProviders.SqlDataConnection进行数据访问我System.NotSupportedException: An IQueryable that returns a self-referencing Constant expression is not supported.在尝试解析产品的父部门时遇到了问题.
脚本看起来像这样:
#r "System.Data.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "System.Data.Entity.dll"
#r "System.Data.Linq.dll"
open System
open Microsoft.FSharp.Data
open Microsoft.FSharp.Data.TypeProviders
open System.Linq
open System.Data.Linq
open System.Data.Entity
type DbConn = SqlDataConnection< @"super secrete connection string here">
type SubSelOut = { ``Department Name``: String;
``Parent Id``: Nullable<int>;
``Product Id``: int }
[< CLIMutable >]
type QueryGrouping = {``Product Id``: Nullable<int>;
``Product SKU``: string;
Price: Decimal;
``Department Name``: string;
``Parent Department Name``: string; } …Run Code Online (Sandbox Code Playgroud)