create table dbo.Users(Id Int primary key, Name NVarChar(max), Role NVarChar(max))
insert into dbo.Users(Id, Name, Role) values (1, N'Peter', N'Admin')
insert into dbo.Users(Id, Name, Role) values (2, N'Peter', N'User')
insert into dbo.Users(Id, Name, Role) values (3, N'Igor', N'Admin')
Create the database, compile and execute Program A and Program B.
System.ArgumentException: Type mismatch when building 'args': invalid parameter for a method or indexer property. Expected 'System.Linq.IQueryable`1[FSharp.Data.Sql.Common.SqlEntity]', but received type 'System.Object'.
Parameter name: receivedType
at Microsoft.FSharp.Quotations.PatternsModule.checkTypesWeakSR[a](Type expectedType, Type receivedType, a name, String threeHoleSR)
at [email protected](ParameterInfo p, FSharpExpr a)
at Microsoft.FSharp.Collections.ListModule.loop@183-27[T1,T2](FSharpFunc`3 f, FSharpList`1 list1, FSharpList`1 list2)
at Microsoft.FSharp.Collections.ListModule.Iterate2[T1,T2](FSharpFunc`2 action, FSharpList`1 list1, FSharpList`1 list2)
at Microsoft.FSharp.Quotations.PatternsModule.checkArgs(ParameterInfo[] paramInfos, FSharpList`1 args)
at Microsoft.FSharp.Quotations.PatternsModule.mkInstanceMethodCall(FSharpExpr obj, MethodInfo minfo, FSharpList`1 args)
at Microsoft.FSharp.Quotations.FSharpExpr.Call(FSharpExpr obj, MethodInfo methodInfo, FSharpList`1 arguments)
at FSharpComposableQuery.QueryImpl.toExp@386(QueryBuilder this, Exp exp)
at FSharpComposableQuery.QueryImpl.QueryBuilder.toExpr(Exp exp)
at FSharpComposableQuery.QueryImpl.QueryBuilder.Norm[T](FSharpExpr`1 expr)
at FSharpComposableQuery.QueryImpl.QueryBuilder.Run[T](FSharpExpr`1 q)
at Program.main(String[] argv) в T:\Temp\ConsoleApplication6\ConsoleApplication6\Program.fs:строка 30
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FSharp.Core" version="4.1.17" targetFramework="net462" />
<package id="FSharp.Data.TypeProviders" version="5.0.0.2" targetFramework="net462" />
<package id="FSharpComposableQuery" version="1.0.4-beta" targetFramework="net462" />
<package id="SQLProvider" version="1.1.2" targetFramework="net462" />
<package id="System.ValueTuple" version="4.3.0" targetFramework="net462" />
</packages>