Entity framework and VARBINARY

前端 未结 3 473
小蘑菇
小蘑菇 2021-01-12 14:42

I’m using the .NET entity framework and I’ve got one entity containing a varbinary. Is there an easy way to get the size of the varbinary in the codebehind, efter it’s been

3条回答
  •  南笙
    南笙 (楼主)
    2021-01-12 14:54

    I know this question is old, but EF now supports this by using SqlFunctions.DataLength()

提交回复
热议问题