Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何保存byte[]数组到数据库,不定长 #63

Closed
rote667668 opened this issue Jun 9, 2018 · 5 comments
Closed

如何保存byte[]数组到数据库,不定长 #63

rote667668 opened this issue Jun 9, 2018 · 5 comments

Comments

@rote667668
Copy link

新手用SqlSugar,请帮助我谢谢!

定义了个数组
[SugarColumn(IsNullable = true)]
public byte[] Histo { get; set; }
直接给他赋值了别的数组 Histo = new byte[10]{1,2.3,4,5,6,7,8,9,10}
然后执行sqlClient.Insertable(dbTestRst).ExecuteCommandAsync();发现Histo这个数据列并没有数据是空的,我应该如何操作数组写入数据库?

@rote667668
Copy link
Author

用的是SQLite

@lpyedge
Copy link

lpyedge commented Jun 9, 2018 via email

@rote667668
Copy link
Author

@lpyedge 我每条数据10K的byte,每条都要这样转,岂不是很影响效率

@lpyedge
Copy link

lpyedge commented Jun 9, 2018 via email

@rote667668
Copy link
Author

@lpyedge 说的很有道理 我先这么试试,以后不行了再研究,谢谢你

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants