예제 #1
0
 public void Apply(IVersionInstance instance)
 {
     instance.Generated.Always();
     instance.UnsavedValue("0");
     instance.Not.Nullable();
     instance.Default(1);
 }
예제 #2
0
 public void Apply(IVersionInstance instance)
 {
     if (typeof(IVersionable).IsAssignableFrom(instance.EntityType))
     {
         instance.Generated.Always();
     }
 }
예제 #3
0
 public void Apply(IVersionInstance instance)
 {
     if (typeof(IVersionable).IsAssignableFrom(instance.EntityType))
     {
         instance.Generated.Always();
     }
 }
예제 #4
0
 public void Apply(IVersionInstance instance)
 {
     instance.Column("Version");
     instance.CustomType("BinaryBlob");
     instance.CustomSqlType("timestamp");
     instance.Generated.Always();
     instance.UnsavedValue("null");
 }
예제 #5
0
 public void Apply(IVersionInstance instance)
 {
     if (instance.Type.Name == "BinaryBlob")
     {
         instance.Nullable();
         instance.CustomSqlType("timestamp");
         instance.Generated.Always();
     }
 }
예제 #6
0
		public void Apply(IVersionInstance instance)
		{
			// These are NH default values for a type named "Version"
			instance.Column("Version");
			instance.UnsavedValue(null);
			instance.CustomSqlType("rowversion");
			// This is the change we are applying
			instance.Generated.Always();
		}
 public void Apply(IVersionInstance instance)
 {
     if (instance.Type.Name == "BinaryBlob")
     {
         instance.Nullable();
         instance.CustomSqlType("timestamp");
         instance.Generated.Always();
     }
 }
예제 #8
0
 public void Apply(IVersionInstance instance)
 {
     // These are NH default values for a type named "Version"
     instance.Column("Version");
     instance.UnsavedValue(null);
     instance.CustomSqlType("rowversion");
     // This is the change we are applying
     instance.Generated.Always();
 }
예제 #9
0
        public virtual void Apply(IVersionInstance instance)
        {
            var versionPropName = "Version";

            var property = instance.EntityType.GetProperties()
                           .FirstOrDefault(x => x.Name == versionPropName);

            if (property == null)
            {
                return;
            }

            var columnAttr = property.GetCustomAttribute <ColumnAttribute>();

            if (columnAttr != null)
            {
                versionPropName = columnAttr.Name;
            }

            instance.Column(versionPropName);
            instance.CustomType(property.PropertyType);
            instance.UnsavedValue("0");
            instance.Not.Nullable();
        }
예제 #10
0
 public virtual void Apply(IVersionInstance instance)
 {
     Apply(instance.EntityType, instance.Name, instance.Access);
 }
예제 #11
0
 /// <summary>
 /// Applies the specified instance.
 /// </summary>
 /// <param name="instance">The instance.</param>
 public void Apply(IVersionInstance instance)
 {
     instance.Not.Nullable();
 }
예제 #12
0
 public void Apply(IVersionInstance instance)
 {
     instance.Generated.Always();
 }
 public void Apply(IVersionInstance instance)
 {
     instance.Column("xxx");
 }
예제 #14
0
 public void Apply(IVersionInstance instance)
 {
     instance.CustomType <RowVersionType>();
     instance.CustomSqlType("rowversion");
     instance.Generated.Always();
 }
        public void Apply(IVersionInstance instance)
        {
            var propName = Inflector.Underscore(instance.Name.ToLower());

            instance.Column(propName);
        }
 public void Apply(IVersionInstance instance)
 {
     instance.Column("xxx");
 }
 public void Apply(IVersionInstance instance)
 {
     instance.Generated.Always();
 }
예제 #18
0
 public void Apply(IVersionInstance instance)
 {
     instance.Column(instance.Name.Camelize());
 }
예제 #19
0
 /// <summary>
 /// Applies the specified instance.
 /// </summary>
 /// <param name="instance">The instance.</param>
 public void Apply(IVersionInstance instance)
 {
     instance.Not.Nullable();
     instance.Column(instance.Name.ToLowerInvariant());
 }
예제 #20
0
 public void Apply(IVersionInstance instance)
 {
     instance.Column("Version");
     instance.UnsavedValue("0");
 }
예제 #21
0
 public void Apply(IVersionInstance instance)
 {
     instance.Column(
         instance.Name.ToCamelCase()
         );
 }
예제 #22
0
 public virtual void Apply(IVersionInstance instance)
 {
     Apply(instance.EntityType, instance.Name, instance.Access);
 }
예제 #23
0
 public void Apply(IVersionInstance instance)
 {
     instance.Access.Field();
 }
 public void Apply(IVersionInstance instance)
 {
     var propName = Inflector.Underscore(instance.Name.ToLower());
     instance.Column(propName);
 }
예제 #25
0
		public void Apply(IVersionInstance instance)
		{
			instance.Column("Version");
			instance.UnsavedValue("0");
		}
예제 #26
0
 /// <summary>
 /// Applies the specified instance.
 /// </summary>
 /// <param name="instance">The instance.</param>
 public void Apply( IVersionInstance instance )
 {
     instance.Not.Nullable ();
 }