question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Global Expression method

See original GitHub issue

Hello,

Is there any way to create mapping with an ExpressionMethodAttribute and call a method that is not defined in the class itself? Say that I couod call a global defined method in multiple classes for mapping. In my case I would like to map a property to a column if it exists, if my database version is older and the column does not exists in this version, I would overwrite thr mapping for this property to an ExpressionMethod that receives the default value.

// column exists 
[Column("Test")]
Public string TestProperty{ get; set}

// column does not exist
[ExpressionMethod("DefaultStringValueMethod"), IsColumn= true]
Public string TestProperty {get; set;}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
sdanylivcommented, Jun 13, 2018

I do not see possiblity. Expression method expects appropriate type for entity, but you can always create dynamic method generator that of course should be marked as expression method. Everything that you have mentioned you can do by our T4 scripts. Add attribute, add method to the entity wih body. Everything.

0reactions
frankiDotNetcommented, Jun 15, 2018

Closed with this solution DateTime-Nullable

Read more comments on GitHub >

github_iconTop Results From Across the Web

Revisiting Global Gene Expression Analysis - PMC
Global gene expression analysis uses DNA microarrays, RNA-Seq, and other methods to measure the levels of RNA species in biological systems (Geiss et...
Read more >
Global Gene Expression Profiling and Transcription Factor ...
This study aimed to perform global gene expression profiling of cognitive function to identify associated genes and pathways and a novel ...
Read more >
Methodology - The Global Expression Report 2023
Methodology. The Global Expression Report (GxR) is a data-driven look at the right to freedom of expression and information across the world.
Read more >
Revisiting Global Gene Expression Analysis
Global gene expression analysis uses DNA microarrays, RNA-Seq, and other methods to measure the levels of RNA species in biological systems ( ...
Read more >
Gene expression profiling
... expression profiling is the measurement of the activity (the expression) of thousands of genes at once, to create a global picture of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found