Techiio-author
Started by Peter DanielsSep 23, 2021

Open
How to send a null value to a not null column in ASP.NET with LINQ

0 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 0 VIEWES SHARE

my problem is this:

  • I have a table in SQL Server that have a NOT NULL Column that uses a SEQUENCE as default (NEXT VALUE FOR SeqDefa), that column is not the PK from the table.
  • I building a web form in ASP.NET that does a CRUD in that table, when i want to send a null value in that column to use the default in that table i get an error. that's because LINQ says that you can't send a null value to a not null column

how can i fix it?

can i get the sequence´s next value from LINQ in my form? there's another option than changing table column from not null to allowing nulls?

0 Replies

You must be Logged in to reply
Trending Technologies
15
Software40
DevOps46
Frontend Development24
Backend Development20
Server Administration17
Linux Administration26
Data Center24
Sentry24
Terraform23
Ansible83
Docker70
Penetration Testing16
Kubernetes21
NGINX20
JenkinsX17
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance