如何在向量场上分组
我正在使用 Linq 查询,但无法使用向量字段进行分组。
我的 Linq 查询是这样的..
var Query = (from a in Helper.db.AccountStatement
join b in Helper.db.BankAccount on a.BankAccId equals b.BankAccId
join c in Helper.db.BankBranch on b.BankBranchId equals c.BankBranchId
join d in Helper.db.Bank on c.BankId equals d.BankId
where b.AccType == AccType && a.ActiveStatement == true && b.ActiveAccount == true && b.UserId == UserId
group new{ a,b,d} by new {b.BankAccId,d.Name,b.AccNumber,a.ClosingBalance,d.Logo} into h
select new clsFillBankSymmary
{
BankAccountId = h.Key.BankAccId,
BankName = h.Key.Name,
BankAccountNo =h.Key.AccNumber,
ClosingBalance = h.Key.ClosingBalance,
BankLogo = (byte[])h.Key.VectorLogo.ToArray()
});
return Query;`
谢谢...!!!
I am working Linq Query, but I am not able to Group by with Vector field.
and my Linq Query is like this..
var Query = (from a in Helper.db.AccountStatement
join b in Helper.db.BankAccount on a.BankAccId equals b.BankAccId
join c in Helper.db.BankBranch on b.BankBranchId equals c.BankBranchId
join d in Helper.db.Bank on c.BankId equals d.BankId
where b.AccType == AccType && a.ActiveStatement == true && b.ActiveAccount == true && b.UserId == UserId
group new{ a,b,d} by new {b.BankAccId,d.Name,b.AccNumber,a.ClosingBalance,d.Logo} into h
select new clsFillBankSymmary
{
BankAccountId = h.Key.BankAccId,
BankName = h.Key.Name,
BankAccountNo =h.Key.AccNumber,
ClosingBalance = h.Key.ClosingBalance,
BankLogo = (byte[])h.Key.VectorLogo.ToArray()
});
return Query;`
Thanks...!!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从 LINQ 开始,将 Vector 列的 DB 类型更改为 varbinary(MAX) 应该可以解决问题。
As of LINQ, changing the DB type of the Vector column to varbinary(MAX) should do the trick.