This is a migrated thread and some comments may be shown as answers.

Null Value VS string.Empy

4 Answers 44 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
john
Top achievements
Rank 1
john asked on 17 Sep 2012, 12:42 PM
If one column is not nullable in DB. I use Open Access ORM wizad to generate entity class. If I set the string.Empty to the column and call save method, it works without any exception. Is there a way to treat string.Empty as null for one column while update/insert?

4 Answers, 1 is accepted

Sort by
0
john
Top achievements
Rank 1
answered on 19 Sep 2012, 02:21 PM
Any solution?
0
PetarP
Telerik team
answered on 20 Sep 2012, 12:06 PM
Hello john,

 A possible solution would be to slightly change the t4 template that is used to generate our code in order to apply a check for string empty in the property setter and not allow it.
Will that work for you?

Regards,
Petar
the Telerik team
Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
0
john
Top achievements
Rank 1
answered on 20 Sep 2012, 12:11 PM
I think the feature need to be consider to integrated in OpenAccess ORM framework. It's the basic feature.
0
PetarP
Telerik team
answered on 25 Sep 2012, 09:39 AM
Hi john,

 We have added this feature to our backlog system and we will discuss id and possibly schedule it for implementation for one of our next release.
Please find your Telerik points updated for making this feature request.

Kind regards,
Petar
the Telerik team
Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
Tags
General Discussions
Asked by
john
Top achievements
Rank 1
Answers by
john
Top achievements
Rank 1
PetarP
Telerik team
Share this question
or