public override InternalPropertyBuilder Apply(InternalPropertyBuilder propertyBuilder, ConcurrencyCheckAttribute attribute, PropertyInfo clrProperty) { Check.NotNull(propertyBuilder, nameof(propertyBuilder)); Check.NotNull(attribute, nameof(attribute)); propertyBuilder.ConcurrencyToken(true, ConfigurationSource.DataAnnotation); return(propertyBuilder); }
public override InternalPropertyBuilder Apply(InternalPropertyBuilder propertyBuilder, TimestampAttribute attribute) { Check.NotNull(propertyBuilder, nameof(propertyBuilder)); Check.NotNull(attribute, nameof(attribute)); if (propertyBuilder.Metadata.ClrType != typeof(byte[])) { throw new InvalidOperationException(Strings.TimestampAttributeOnNonBinary(propertyBuilder.Metadata.Name)); } propertyBuilder.ValueGenerated(ValueGenerated.OnAddOrUpdate, ConfigurationSource.DataAnnotation); propertyBuilder.ConcurrencyToken(true, ConfigurationSource.DataAnnotation); return(propertyBuilder); }