unity-orm icon indicating copy to clipboard operation
unity-orm copied to clipboard

IntValueConverter , If (o == null) ---- should return null.

Open malcolmjerry opened this issue 7 years ago • 0 comments

` public class IntValueConverter : ValueConverter{

      public override object FromJson (object o) {
		if(o == null){
	           //return 0;   
                   return null;   //here  should return null !!!!!!!!!!!!
      }

}

And we should add a FieldLister converters :

	public FieldLister () {
	    converters.Add(typeof(string),new StringValueConverter());
	    converters.Add(typeof(int),new IntValueConverter());
            converters.Add(typeof(int? ), new IntValueConverter());  //New added!!!!!!!
        }	

.............................`

malcolmjerry avatar Jan 01 '18 20:01 malcolmjerry