Free version of nhibernate automap version

Current code in my agreement:

    public void Apply(FluentNHibernate.Conventions.Instances.IVersionInstance instance)
    {
        instance.Column("RowVersion");
        instance.Not.Nullable();
        instance.UnsavedValue("0");
        instance.Default(1);
    }

This does not display RowVersion as the version column. He views RowVersion as another column.

So my question is: how to add Concurrency version string using Fluent Nhibernate?

+3
source share
1 answer

The class VersionStepsearches only for properties matching the names Versionor Timestamp. Your property must match that name. Replacing VersionStepnaming conventions is another option.

+1
source

Source: https://habr.com/ru/post/1731101/


All Articles