Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

How to use References() with specifying different type? #427

Answered by hazzik
Ephasme asked this question in General
Discussion options

I want to use Optional references with LanguageExt but I can't use Option<Something> Something {get;set;} with the mapping References(x => x.Something).CustomType(typeof(Something))
How could I do this?

I asked this very question on SO : https://stackoverflow.com/questions/54747437/
It's more complete than here.

You must be logged in to vote

Answered by the @Ephasme:

I finally found a solution:

References(x => x.Sunroof, "idSunroof")
    .Access.CamelCaseField(Prefix.Underscore)
    .Class<Window>();

Replies: 2 comments

Comment options

Answered by the @Ephasme:

I finally found a solution:

References(x => x.Sunroof, "idSunroof")
    .Access.CamelCaseField(Prefix.Underscore)
    .Class<Window>();
You must be logged in to vote
0 replies
Answer selected by hazzik
Comment options

To elaborate on the answer. CustomType is for value types. References is to make a reference to an entity.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #427 on September 24, 2020 23:38.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.