Skip to content

Instantly share code, notes, and snippets.

View steveoh's full-sized avatar
🚀

steveoh steveoh

🚀
View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Http;
public static class ModelStateDictionaryExtensions
{
public static IEnumerable<string> ToErrors(this ModelStateDictionary dict)
{
return dict.OrderBy(kvp => kvp.Key)