GithubHelp home page GithubHelp logo

Comments (7)

simon-reynolds avatar simon-reynolds commented on May 22, 2024 1

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.

flensrocker avatar flensrocker commented on May 22, 2024 1

Can't wait... :)

It works in my case!

from efcore.fsharp.

simon-reynolds avatar simon-reynolds commented on May 22, 2024

Hi @zelenij
This should be resolved now by https://www.nuget.org/packages/EntityFrameworkCore.FSharp/5.0.3-alpha8

from efcore.fsharp.

zelenij avatar zelenij commented on May 22, 2024

Thanks, will give it a go a bit later! :)

from efcore.fsharp.

flensrocker avatar flensrocker commented on May 22, 2024

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.

flensrocker avatar flensrocker commented on May 22, 2024

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.

flensrocker avatar flensrocker commented on May 22, 2024

I will take a look later this evening or tomorrow. Thank you!

from efcore.fsharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.