Changeset c404b2a6640b…
Parent a29032a10991…
by
Changes to 2 files · Browse files at c404b2a6640b Showing diff from parent a29032a10991 Diff from another changeset...
@@ -24,7 +24,11 @@ Identity,
UNIQUE
}
-
+
+ public enum SpecialDefaults
+ {
+ NewId
+ }
/// <summary>
/// Represents a table column.
/// </summary>
|
@@ -476,6 +476,17 @@ /// <returns></returns>
private string ToSqlValue(Type type, object value)
{
+ if (value is SpecialDefaults)
+ {
+ switch ((SpecialDefaults)value)
+ {
+ case SpecialDefaults.NewId:
+ default:
+ return "newid()";
+ }
+ }
+
+
if (type == typeof(string) || (type == typeof(char)) || (type == typeof(DateTime)) || type == typeof(Guid)|| type == typeof(Guid?))
{
if (value == null)
|
Loading...