The Wayback Machine - https://web.archive.org/web/20201125120753/https://github.com/topics/access
Skip to content
#

access

Here are 355 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 access 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 access topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.