---
title: "Saving enums as strings with Entity Framework"
url: https://daily.dev/posts/saving-enums-as-strings-with-entity-framework-4w0wedzo0
source_url: https://nodogmablog.bryanhogan.net/2014/11/saving-enums-as-strings-with-entity-framework
type: article
source: "No Dogma Blog (Bryan Hogan)"
published: 2026-05-31T07:47:08.086Z
updated: 2026-05-31T08:47:24.124Z
tags: [".net", "c#"]
reading_time: 2
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Saving enums as strings with Entity Framework

**[No Dogma Blog \(Bryan Hogan\)](https://daily.dev/sources/bryanhogan)** · 2 min read · 0 upvotes · 0 comments

## Summary

A workaround for storing enum values as strings in Entity Framework (classic) instead of their numeric equivalents. The approach uses a mapped string property (GenderString) with a private setter and a [NotMapped] attribute on the actual enum property, plus a generic ParseEnum extension method to convert the string back to the enum on load. The author acknowledges this is a hacky solution and notes a cleaner approach exists in Entity Framework Core.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://nodogmablog.bryanhogan.net/2014/11/saving-enums-as-strings-with-entity-framework>

---

Tags: [#.net](https://daily.dev/tags/.net), [#c#](https://daily.dev/tags/c#)

[View this post on daily.dev](https://daily.dev/posts/saving-enums-as-strings-with-entity-framework-4w0wedzo0)
