Commit bbf93cb2 authored by ithero7's avatar ithero7

Little changes :)

Correct the spelling mistake, and change the variable name to satisfy the naming conventions.
parent 010eae66
......@@ -126,7 +126,7 @@ private static bool IsWriteable(PropertyInfo pi)
if (keys.Count() > 1)
throw new DataException("Get<T> only supports an entity with a single [Key] property");
if (!keys.Any())
throw new DataException("Get<T> only supports en entity with a [Key] property");
throw new DataException("Get<T> only supports an entity with a [Key] property");
var onlyKey = keys.First();
......@@ -232,9 +232,9 @@ private static string GetTableName(Type type)
else
{
//NOTE: This as dynamic trick should be able to handle both our own Table-attribute as well as the one in EntityFramework
var tableattr = type.GetCustomAttributes(false).SingleOrDefault(attr => attr.GetType().Name == "TableAttribute") as dynamic;
if (tableattr != null)
name = tableattr.Name;
var tableAttr = type.GetCustomAttributes(false).SingleOrDefault(attr => attr.GetType().Name == "TableAttribute") as dynamic;
if (tableAttr != null)
name = tableAttr.Name;
else
{
name = type.Name + "s";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment