Ejemplo n.º 1
0
 protected override void Apply(DefaultValueAttribute attribute, IPropertyInstance instance)
 {
     if (!string.IsNullOrEmpty(attribute.Value))
     {
         if (instance.Type == typeof(bool) || instance.Type == typeof(bool?))
         {
             instance.Default(attribute.Value);
         }
         else
         {
             instance.Default(attribute.Value);
         }
     }
 }
Ejemplo n.º 2
0
 private static bool ProcessDateTypes(IPropertyInstance instance)
 {
     if (instance.Type == typeof(DateTime))
     {
         if (instance.Name.ToUpper().Contains("START") || instance.Name.ToUpper().Contains("CREATEDON"))
         {
             instance.Default("(getdate())");
             instance.Not.Nullable();
         }
         return(true);
     }
     return(false);
 }
 public void Apply(IPropertyInstance instance)
 {
     instance.ReadOnly();
     instance.Generated.Insert();
     instance.Default("getDate()");
 }
 public void Apply(IPropertyInstance instance)
 {
     instance.ReadOnly();
     instance.Generated.Insert();
     instance.Default("getDate()");
 }
 protected override void Apply(DefaultValueAttribute attribute, IPropertyInstance instance)
 {
     instance.Default(attribute.Value.ToString());
 }