Nullable reference types

Hello,

Do you have any plans to annotate the API to use c# 10 Nullable reference types ?
This would be awesome :slight_smile:

Thank you !

Iโ€™m assuming you mean in the context of Table schema creation to treat all reference types as NOT NULL by default instead of using [Required] attribute to enforce NOT NULL on reference types?

We can consider it but it would need to be opt-in, please submit the feature request to GitHub Discussions so we can keep track of it, measure interest and keep you updated, at:

https://servicestack.net/ideas

No Iโ€™m talking about enabling nullable references in OrmLite library itself.

For example the db.Single<T>() method may return null, so it should return T? instead of T
This way I would have the appropriate warnings in my nullable enabled code.

Ok yeah converting our code base to use nullable references is an ongoing organic progression where we use it for new code and in places which undergoes major changes, itโ€™ll take a while but we should eventually get there, Iโ€™d still drop a feature request so we can give higher priority to requested libraries.

https://servicestack.net/ideas

1 Like