# \[NEST\] How to map a enum property correctly?

**URL:** <https://discuss.elastic.co/t/nest-how-to-map-a-enum-property-correctly/88474>\
**Category:** Elasticsearch\
**Created:** [June 6, 2017, 9:16pm UTC](https://discuss.elastic.co/t/nest-how-to-map-a-enum-property-correctly/88474 "2017-06-06T21:16:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielmedina\_rj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmedina_rj/32/18852_2.png) [@danielmedina\_rj](https://discuss.elastic.co/u/danielmedina_rj)\
**Post date:** [June 6, 2017, 9:16pm UTC](https://discuss.elastic.co/t/nest-how-to-map-a-enum-property-correctly/88474/1 "2017-06-06T21:16:20Z")

</div>

I searched all the day about the correct way to map enum properties to Elasticsearch using Nest. Nothing worked.

I'm using ES 5.1.1. My class is using a public enum, but when I submit the object to ES using Nest, ES store the ingeter representation of my enum.

I looked at official documentation, issue list from github, google... Any ideias?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 4, 2017, 9:21pm UTC](https://discuss.elastic.co/t/nest-how-to-map-a-enum-property-correctly/88474/2 "2017-07-04T21:21:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
