in my database, I have a table with a field that has, as default value, defined a squence number. So if I do an INSERT statement and provide no actual value for this field, the next number of the sequence is calculated by SQL Server and used here (pretty similar to an identity column).
The value is defined by a constraint:
ALTER TABLE [dbo].[Account] ADD CONSTRAINT [DF_AccountNo_Seq] DEFAULT (NEXT VALUE FOR [dbo].[AccountNoSequence]) FOR [AccountNo]
Radzen has generated this code in my data context class:
builder.Entity<XXXXXX.Models.XXXX.Account>() .Property(p => p.AccountNo) .HasDefaultValueSql("(NEXT VALUE FOR [dbo].[AccountNoSequence])").ValueGeneratedNever();
The problem is now, if I create a form in Radzen to add new data to that "account" table, Radzen will always try to use "0" as value for this "AccountNo" field. How can I force Radzen to use the new/next sequence number. Again, if I would do a manual insert in SQL to that table, I would not specify the field at all. However, excluding the field from the data model in Radzen is also no option since I need to display the values of this field in a different page.
Any help would be welcome! Thanks!