Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with F# #162

Open
francotiveron opened this issue Aug 9, 2024 · 0 comments
Open

Problems with F# #162

francotiveron opened this issue Aug 9, 2024 · 0 comments

Comments

@francotiveron
Copy link

Does it works with F#?
this code

            db().Positions
                .Upsert(Position(BookId = _books[sourceBook].BookId, InstrumentId = instrumentId))
                .On(fun p -> {| BookId = p.BookId; InstrumentId = p.InstrumentId |})
                .WhenMatched(fun p -> 
                    Position(
                        BookId = destBookId,
                        InstrumentId = p.InstrumentId,
                        Time = p.Time,
                        Value = p.Value,
                        Book = p.Book))
                .RunAsync()

throws this exception at runtime

System.NotSupportedException: Could not convert the following F# Quotation to a LINQ Expression Tree

Sequential (Sequential (Sequential (Sequential (Sequential (Sequential (Value (),
PropertySet (Some (returnVal),
BookId,
[ValueWithName (2,
destBookId)])),
PropertySet (Some (returnVal),
InstrumentId,
[PropertyGet (Some (p),
InstrumentId,
[])])),
PropertySet (Some (returnVal),
Time,
[PropertyGet (Some (p),
Time,
[])])),
PropertySet (Some (returnVal), Value,
[PropertyGet (Some (p), Value,
[])])),
PropertySet (Some (returnVal), Book,
[PropertyGet (Some (p), Book, [])])),
returnVal)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant