aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ThirdParty/TribalMedia/TribalMedia.Framework.Data/DatabaseMapper.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ThirdParty/TribalMedia/TribalMedia.Framework.Data/DatabaseMapper.cs')
-rw-r--r--ThirdParty/TribalMedia/TribalMedia.Framework.Data/DatabaseMapper.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/ThirdParty/TribalMedia/TribalMedia.Framework.Data/DatabaseMapper.cs b/ThirdParty/TribalMedia/TribalMedia.Framework.Data/DatabaseMapper.cs
index 0b9d16d..63e59aa 100644
--- a/ThirdParty/TribalMedia/TribalMedia.Framework.Data/DatabaseMapper.cs
+++ b/ThirdParty/TribalMedia/TribalMedia.Framework.Data/DatabaseMapper.cs
@@ -41,7 +41,6 @@ namespace TribalMedia.Framework.Data
41 } 41 }
42 42
43 public abstract DbConnection GetNewConnection(); 43 public abstract DbConnection GetNewConnection();
44
45 public abstract string CreateParamName(string fieldName); 44 public abstract string CreateParamName(string fieldName);
46 45
47 public DbCommand CreateSelectCommand(TableMapper mapper, DbConnection connection, string fieldName, object key) 46 public DbCommand CreateSelectCommand(TableMapper mapper, DbConnection connection, string fieldName, object key)
@@ -67,7 +66,7 @@ namespace TribalMedia.Framework.Data
67 66
68 DbParameter param = command.CreateParameter(); 67 DbParameter param = command.CreateParameter();
69 param.ParameterName = keyFieldParamName; 68 param.ParameterName = keyFieldParamName;
70 param.Value = FieldMapper.ConvertToDbType(key); 69 param.Value = ConvertToDbType(key);
71 command.Parameters.Add(param); 70 command.Parameters.Add(param);
72 71
73 return String.Format("{0}={1}", fieldName, keyFieldParamName); 72 return String.Format("{0}={1}", fieldName, keyFieldParamName);
@@ -131,5 +130,10 @@ namespace TribalMedia.Framework.Data
131 130
132 return command; 131 return command;
133 } 132 }
133
134 public virtual object ConvertToDbType(object value)
135 {
136 return value;
137 }
134 } 138 }
135} \ No newline at end of file 139} \ No newline at end of file