flow_state
flow_state
CC#
Created by flow_state on 2/15/2023 in #help
❔ Help with record types and Ef Core
Still a head scratcher though
30 replies
CC#
Created by flow_state on 2/15/2023 in #help
❔ Help with record types and Ef Core
Actually you're right. It should not convert since i'm passing the value in via the ctor in the ef core value converter
30 replies
CC#
Created by flow_state on 2/15/2023 in #help
❔ Help with record types and Ef Core
I use it as a convenient way to map from a string to the record type without invoking new all over the place
30 replies
CC#
Created by flow_state on 2/15/2023 in #help
❔ Help with record types and Ef Core
My guess is that the implicit operators on the record type is the cause.
30 replies
CC#
Created by flow_state on 2/15/2023 in #help
❔ Help with record types and Ef Core
but thanks for your help either way
30 replies
CC#
Created by flow_state on 2/15/2023 in #help
❔ Help with record types and Ef Core
🤔... I guess i'll have to look into that
30 replies
CC#
Created by flow_state on 2/15/2023 in #help
❔ Help with record types and Ef Core
sorry i'm using Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.8"
30 replies
CC#
Created by flow_state on 2/15/2023 in #help
❔ Help with record types and Ef Core
6.0.13. This is a .NET6 app
30 replies
CC#
Created by flow_state on 2/15/2023 in #help
❔ Help with record types and Ef Core
Sorry for the misunderstanding, but I tried that as well and got same error
Unhandled exception. System.AggregateException: One or more errors occurred. (No suitable constructor was found for entity type 'DisplayName'. The following constructors had parameters that could not be bound to properties of the entity type: cannot bind 'value' in 'DisplayName(string value)'; cannot bind 'original' in 'DisplayName(DisplayName original)'.)
30 replies
CC#
Created by flow_state on 2/15/2023 in #help
❔ Help with record types and Ef Core
did you mean change the ctor param name to value to match the Value property?
30 replies
CC#
Created by flow_state on 2/15/2023 in #help
❔ Help with record types and Ef Core
I tried that and got an error error CS0542: 'DisplayName': member names cannot be the same as their enclosing type
30 replies
CC#
Created by flow_state on 2/15/2023 in #help
❔ Help with record types and Ef Core
I changed the records param name to displayname, but it unfortunately didn't help. I still get same error
30 replies
CC#
Created by flow_state on 2/15/2023 in #help
❔ Help with record types and Ef Core
30 replies
CC#
Created by flow_state on 2/15/2023 in #help
❔ Help with record types and Ef Core
For context, i'm using this example https://github.com/devmentors/MySpot/blob/master/src/MySpot.Infrastructure/DAL/Configurations/VehicleReservationConfiguration.cs as a guide, and I've seen this pattern replicated in various repos
30 replies
CC#
Created by flow_state on 8/23/2022 in #help
Need Help with creating a JsonSchema
i've attached a file containing the schema and the json payload to validate
2 replies