Linq to Sql - Convert C# to VB.NET help -


I'm having trouble converting the C # link statement for VB.NET. I should change the following statement I'm being hanged on i.Sum (v => v) part.

  User = I = (Option to order with order in order. User == U & amp; product == p op op.ProductQty) Quant = I. Count () == 0? 0: i.Sum (v = & gt; v) Select new {p.ProductName, u.UserName, quantity = quant}  

Here I have for VB, but If (i .count () = 0, 0, i.Sum ()) _ statement states that the total operator 'yoga' without parameters is not supported during the launch (no compile time errors) during the runtime. I have also tried i.Sum (function (q) i.ProductQty, which does not work either (say, the amount can not be called with these arguments).

  of products from P _ U to user in _i = (order in order with products _ where op.Order.User.UserID = u.UserID and op.Product.ProductID = p. ProductID _ Select op.ProductQty_ _ Quantity = _ If (i.Count () = New, select new with {p.ProductName, u.Username, Quantity}  

How to convert any VB to Net and work? Thanks!

Your "arrow" syntax in C #:

 . The sum can be converted into VB.NET (v => v)  

in the following:

  .sum (function (v) v )  

"arrow" syntax is Lambda Expression For more information about Lambda expression in VB.NET, check out.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -