Skip to content

Instantly share code, notes, and snippets.

View ismaelgasparin's full-sized avatar

Ismael "Bill" Gasparin ismaelgasparin

View GitHub Profile
public static string Parse(this DbEntityValidationException e)
{
var builder = new StringBuilder();
foreach (var eve in e.EntityValidationErrors)
{
builder.AppendFormat("Entity type: {0} | State: {1}",eve.Entry.Entity.GetType().Name,eve.Entry.State);
foreach (var ve in eve.ValidationErrors)
builder.AppendFormat("Property name: {0} | Current value: {1} | Error message: {2}",
ve.PropertyName,
eve.Entry.CurrentValues.GetValue<Object>(ve.PropertyName),
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Web;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Blob;