Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Any setting to convert null strings to empty automatical
Message
 
 
À
30/09/2014 13:16:43
Information générale
Forum:
ASP.NET
Catégorie:
Entity Framework
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01608410
Message ID:
01608544
Vues:
31
>>1. In our database we have columns which do not allow null values (all data types except dates are not-nullable in our database).
>>
>>3. When we add a new row in our form, the string values are NULL unless we put values into them.
>
>For me as a rule of thumb such a rule falls under the data dictionary rules needing to be elevated into the GUI automatically, as in providing a blank string as default value for new rows

In the database we do have default values for the columns. However, the INSERT statement already comes with NULLs in them and so far there is nothing that can be done.

In one particular case I traced it to creation of the new ViewModel instance (and therefore all strings by default are created as nulls). So, there can be nothing to convert them back to empty strings unless I fix the ViewModel (which I am plan to do). That was the reason for my recent question although I think I'll go with the known approach with using private extra property (unless someone replies soon with a shorter version suggestion).
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform