Skip to content

Instantly share code, notes, and snippets.

@mombrea
mombrea / Precision.cs
Created April 14, 2015 14:19
.NET Data Annotation to define precision on decimal data types in EF6
using System;
using System.Data.Entity;
using System.Linq;
namespace My.Data.Annotations
{
/// <summary>
/// The Precision class allows us to decorate our Entity Models with a Precision attribute
/// to specify decimal precision values for the database column
/// </summary>