bitScry

  • Home
  • About
  • Blog
  • Contact

Enum

About this site

This is a blog to help me remember some of the coding challenges I’ve faced and hopefully help others out if they’re suffering the same problems.

Recent Posts
  • Cloning a Private Repository in a GitHub Workflow
  • Installing Multiple .NET Versions in GitHub Actions
  • Serving Images from Blob Storage in an Azure Function
  • Redis Caching in .NET
  • Passing Environment Variables From Docker to .NET Web App
Tag Cloud

.NET .NET Core AAD API ASP.NET Core Authentication Azure Azure Active Directory Azure Function Azure Storage Blob Bootstrap C# Console Application CSS DataTable Dependency Injection Dictionary Entity Framework Enum Extension Google GZip HTML Image JavaScript jQuery JSON List Middleware MVC Newtonsoft RestSharp Serilog SQL SSDT SSIS Stored Procedure Stream Table Table Storage Test Web App Web Application WordPress

Programming

Converting a Char Character to an Enum in Entity Framework

If you’re using Entity Framework with a legacy database then you may well have single character status flags in some of the columns such as “O” = Operational, “M” = Marketing. Ideally these would be numeric IDs that match to a separate status table which would allow the IDs to … Read more

By Shinigami, 4 years29 July 2019 ago
Programming

Adding TableEntity Enum Text Values to Azure Table Storage

In a similar vein to my post on storing complex properties of a TableEntity in Azure Table Storage it’s also possible to store Enum text values by using custom attributes to control serialization/deserialization.

By Shinigami, 4 years17 April 2019 ago
Programming

Select List Enum Tag Helper

If you want to have a select list in a web page which is based on all the values in an enum then you can use the built in function “Html.GetEnumSelectList” with a tag helper.

By Shinigami, 6 years22 September 2017 ago
Programming

Enum JSON Converter

In addition to the SingleOrArrayEnumConverter mentioned previously I’ve also created a version to translate enums to/from JSON using the name of the enum rather than it’s value as is the default. This can then be used to decorate your enum class like so.

By Shinigami, 6 years22 September 2017 ago
Programming

Single or Array Enum JSON Converter

In addition to the SingleOrArrayConverter mentioned previously I’ve also created a version to translate enums to/from JSON using the name of the enum rather than it’s value as is the default.

By Shinigami, 6 years6 September 2017 ago
  • Facebook
  • Twitter
  • Instagram
  • Email
Hestia | Developed by ThemeIsle