Skip to content

Instantly share code, notes, and snippets.

View gilday's full-sized avatar
🍕

Johnathan Gilday gilday

🍕
View GitHub Profile
/// <summary>
/// Adds a model error using strongly typed lambda expressions
/// </summary>
public static void AddModelError<TModel>(
this ModelStateDictionary modelState,
Expression<Func<TModel, object>> method,
string message)
{
if (method == null)
{