0

I'm trying to use SQL Server 2012 + Fluent NHibernate + sequences. I have a created sequence in SQL Server 2012, I've configured the sequence in my table like in this link sequence as a default value for a column in SQL Server But I'm trying to insert a record and It does not work, I receive the error "null identifier".

Is there any example about how to configure Fluent NHibernate working with SQL Server 2012 sequences?

Regards

Community
  • 1
  • 1
shinjidev
  • 383
  • 1
  • 6
  • 21

1 Answers1

1

Take a look a this site, here they use a default sequence.

this.Id(x => x.Id)
.GeneratedBy.SeqHiLo("mysequence", "1000")
.Default("next value for mysequence");
Orlando Helmer
  • 403
  • 1
  • 4
  • 14