To set a null value, instead of using Entity.Column = value, use Entity.SetNewFieldValue(ColumnName, null) method.
Build errors may occur if you to to set a null value like you would a non-null value. i.e.
oPayment.LoginID = null;
or
oPayment.LoginID = DBNull.Value;
------------------------------------------------------------------------------------------------------------
Instead of trying to assign a value to the entity property as above, use the Entity.SetNewFieldValue() method to save a NULL value in the database.
In this example, the LoginID is set to NULL:
PaymentEntity oPayment = new PaymentEntity(iPaymentID);
oPayment.SetNewFieldValue("LoginId", null);
oPayment.Save();