Comments (7)
Hi @flensrocker
You're absolutely right, that should be an anonymous record type in the HasData
method
I've just released https://www.nuget.org/packages/EntityFrameworkCore.FSharp/5.0.3-alpha10 if you can take a look, should address both issues
from efcore.fsharp.
Can't wait... :)
It works in my case!
from efcore.fsharp.
Hi @zelenij
This should be resolved now by https://www.nuget.org/packages/EntityFrameworkCore.FSharp/5.0.3-alpha8
from efcore.fsharp.
Thanks, will give it a go a bit later! :)
from efcore.fsharp.
Hi,
I'm using 5.0.3-alpha9. There seems to a little mistake at the end of each record.
Code generated:
values = array2D [ [ Guid("cd735892-e9a7-4b36-b910-03e97a95b421") :> obj; "user1" ] :> obj; [ Guid("ff7b5153-2218-45bc-9838-892b99f97b59") :> obj; "user2" ] ]
Should be:
values = array2D [ [ Guid("cd735892-e9a7-4b36-b910-03e97a95b421") :> obj; "user1" :> obj ]; [ Guid("ff7b5153-2218-45bc-9838-892b99f97b59") :> obj; "user2" :> obj ] ]
The :> obj
cast is not inside the bracket. And it's missing at the last record.
Thank you!
from efcore.fsharp.
And there is an error FS0039 in BuildTargetModel
, in my case the Id
property can't be resolved (I only have the german error message).
Maybe it should be an anonymous record at that place (that's what gets suggested as a fix)?
Sorry, I'm new to F#... :)
Generated:
b.HasData([|
{ Id = Guid("cd735892-e9a7-4b36-b910-03e97a95b421"); Username = "user1"; }
{ Id = Guid("ff7b5153-2218-45bc-9838-892b99f97b59"); Username = "user2"; }
|]) |> ignore
Should be?
b.HasData([|
{| Id = Guid("cd735892-e9a7-4b36-b910-03e97a95b421"); Username = "user1"; |}
{| Id = Guid("ff7b5153-2218-45bc-9838-892b99f97b59"); Username = "user2"; |}
|]) |> ignore
from efcore.fsharp.
I will take a look later this evening or tomorrow. Thank you!
from efcore.fsharp.
Related Issues (20)
- [Single case DUs] The binary operator Equal is not defined for the types `UserId` and `UserId` HOT 1
- DbContextHelpers.fs methods return type obj instead of 'a HOT 1
- [Option] Optional DateTime properties cannot be filtered HOT 1
- Migration not generated due to optional single case DU HOT 1
- Unable to create migration using Pomelo's connector when Option types are already present in model HOT 7
- How do you create an optional navigation property? HOT 3
- Scaffolding fails if a column uses a DEFAULT value
- singleCaseUnionMemberTranslator Translate should return null for non-applicable expressions
- Support for empty discriminated union HOT 2
- Documentation: Guide on how to create a many-to-many relationships HOT 2
- When trying to call registerSingleCaseUnionTypes from C#, I get an InvalidOperationException
- NullReferenceException on second migration HOT 1
- The Getting Started guide does not work well HOT 3
- NullReferenceException when deleting optional fields
- Support EF Core 7 HOT 1
- Scaffolding a `nvarchar NULL` creates a `string` and not a `string option`
- Nullpointer on second migration when having a string option field
- Extension UseFsharpTypes() interferes with the npgsql translation for where statement on jsonb columns
- Subsequent migrations fail with `type 'JsonDocument' is not defined` error for JSONB column HOT 3
- Npgsql JSONB to POCO mapping produces an empty `open` stmt in `Migration/*Snapshot.fs`
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 efcore.fsharp.