What is the best way to assign the String.Empty values to the property if it is Null using asp.net mvc?

Jason's idea is sound assuming you do not care about making that minor change. Another way you could do it is to abandon your automatic property and handle the checking in the get.

You could change the column in the database to not be NULL and set the default value to ''. That way you would not have to use the? Conditional.

Not sure if this is best practise, but it would save you having to add additional code to cater for it.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions