Comments (8)
Do I really have to downgrade to dotnet core 3.1 to be able to use version > 2.1.0 of this library?
Nope, please use the preview
flag in fsproj. We will see where it will go with v3, but my goal is to aim directly for .NET6
from dapper.fsharp.
There are unit tests exercising this, so it should work.
Maybe the problem is because you are not following the query expression with a call to SelectAsync
.
For example:
select {
table "Players"
innerJoin "Games" "Id" "GameId"
where (eq "Players.Id" playerId.Value)
}
|> conn.SelectAsync<Player, Game>
from dapper.fsharp.
Also, have you tried using the Linq API?
It would be something like this:
open Dapper.FSharp.LinqBuilders
let playersTable = table'<Player> "Players"
let gamesTable = table'<Game> "Games"
select {
for p in playersTable do
join g in gamesTable on (p.GameId = g.Id)
where (p.Id = playerId.Value)
}
|> conn.SelectAsync<Player, Game>
from dapper.fsharp.
Maybe the problem is because you are not following the query expression with a call to
SelectAsync
.
Of course I have the SelectAsync
there. The code was totally OK on v2.1.0.
Also, have you tried using the Linq API?
Let me try now, but only for investigation purpose, personally I don't like Linq :D
from dapper.fsharp.
Sure. I only asked in the spirit of troubleshooting. 😉
from dapper.fsharp.
Maybe one guess. Do you use version of F# >= 5 or having preview flag in fsproj?
I recently changed API with using custom operation overloads and marking old methods as Obsolete... So maybe that's the issue.
from dapper.fsharp.
The Linq API works, except that there is a little warning on join g in gamesTable on (p.GameId = g.Id)
: The value g is unused
. But if I change the first g
to _
, it becomes an error.
I'm using JetBrains Rider.
By the way, I changed my mind, Linq API is better, since it's more type-safe, especially in where
clause.
Any yes, I'm using F# 5, but not having preview flag.
from dapper.fsharp.
I have the exact same issue, also on 5. Do I really have to downgrade to dotnet core 3.1 to be able to use version > 2.1.0 of this library?
from dapper.fsharp.
Related Issues (20)
- Add TypeHandler for fieldless and single case DUs
- Support union/union all cases HOT 3
- SQLite.OptionTypes.register seems to be missing `float`
- Is there a query that implements something like `QueryFirst`, `QueryFirstOrDefault`? HOT 2
- Question about the Where operator AND and OR HOT 3
- Are multi column joins no longer supported? HOT 9
- Sqlite and multiple type registration HOT 3
- Structures in columns HOT 3
- Working with auto increment IDs HOT 3
- namespace 'LinqBuilders' is not defined HOT 8
- Postgresql Full Text Searching HOT 1
- how to use transactions in DapperFSharp? HOT 3
- Adding pipeline API? HOT 1
- How do typehandlers in F# work?
- Not Implemented Exception While Using SRTP HOT 6
- "count" problem with inner join in v4.5.1+ HOT 2
- `CLIMutable` seems to be necessary for some records HOT 4
- Record attribute to use capitalized word for record key on F# but lowercase for database HOT 2
- Batch insert support HOT 6
- Support select with `IAsyncEnumerable<'t>` result
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dapper.fsharp.