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
  • Mocking Hangfire BackgroundClient Jobs
  • Running Shinobi CCTV on a Raspberry Pi
  • Visual Studio CoreCLR Error
  • Adding Healthchecks to a .NET Core 6 API
  • Getting Location From IP Address
Tag Cloud

.NET .NET Core AAD API appsettings.json ASP.NET Core Authentication Azure Azure Active Directory Azure Function Azure Storage Blob Bootstrap C# Cloud Storage Console Application CSS CSV DataTable Dependency Injection Dictionary Enum Extension Google GZip HTML Image JavaScript jQuery JSON List MVC MVC 6 Newtonsoft RestSharp Serilog SFTP SQL Stored Procedure Stream Table Table Storage 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, 3 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, 3 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, 5 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, 5 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, 5 years6 September 2017 ago
  • Facebook
  • Twitter
  • Instagram
  • Email
Hestia | Developed by ThemeIsle