コード例 #1
0
 public CorrelationProperty(string name, CorrelationPropertyType type)
 {
     Guard.AgainstNullAndEmpty(nameof(name), name);
     Name = name;
     Type = type;
 }
コード例 #2
0
 static string GetColumnType(CorrelationPropertyType propertyType)
 {
     switch (propertyType)
     {
         case CorrelationPropertyType.DateTime:
             return "datetime";
         case CorrelationPropertyType.DateTimeOffset:
             throw new Exception("DateTimeOffset is not supported by MySql.");
         case CorrelationPropertyType.String:
             return "varchar(450)";
         case CorrelationPropertyType.Int:
             return "bigint";
         case CorrelationPropertyType.Guid:
             return "varchar(38)";
     }
     throw new Exception($"Could not convert {propertyType}.");
 }
コード例 #3
0
 static string GetColumnType(CorrelationPropertyType propertyType)
 {
     switch (propertyType)
     {
         case CorrelationPropertyType.DateTime:
             return "datetime";
         case CorrelationPropertyType.DateTimeOffset:
             return "datetimeoffset";
         case CorrelationPropertyType.String:
             return "nvarchar(450)";
         case CorrelationPropertyType.Int:
             return "bigint";
         case CorrelationPropertyType.Guid:
             return "uniqueidentifier";
     }
     throw new Exception($"Could not convert {propertyType}.");
 }