Skip to content
#

bulk

Here are 188 public repositories matching this topic...

boris-turk
boris-turk commented Oct 25, 2020

Hi,

is it possible to define enum mappings WITHOUT using attributes, maybe with some kind of fluent API? The only possibility I see right now is to use the MapValue attribute:

public enum Gender
{
	[MapValue("M")] Male,
	[MapValue("F")] Female,
	[MapValue("U")] Unknown,
	[MapValue("O")] Other,
}

But I don't like this approach (see my longer explanation below). Thank you in

Improve this page

Add a description, image, and links to the bulk topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the bulk topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.