简体   繁体   中英

How do I sanitize all my string inputs using Entity Framework Core and Npgsql?

So, here is the issue: the system can sometimes create in some of the strings the null character (\\0). This is by design and is working properly. The issue is that when I want to store this data in the DAL I need to first get rid of all the null characters (PostgreSQL does not support the null character). In theory, I can go all over each of the inputs and manually sanitize it, but this can be a very long and painful process. I am wondering, is there a fast and easy way to just sanitize all of those strings using the Entity Framework Core itself?

Thanks

您可能正在寻找值转换器功能

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM