This question is locked. New answers and comments are not allowed.
Hi,
i got a question how can i achive to sum price of all invoice elements? i mean i tried something like that:
but it throws error with sum on server side
tried also something like this:
is it possible to make such sum?
i got a question how can i achive to sum price of all invoice elements? i mean i tried something like that:
var query = from i in scope.Extent<Invoice>() select new { Id = i.Id, Code = i.Code, ContactDescription = i.Contact.Description, Price = (from ii in i.Invoiceitems select new { Price = ii.Price * ii.Quantity }).Sum(ii => ii.Price), DocumentDate = i.DocumentDate };but it throws error with sum on server side
tried also something like this:
var query = from i in scope.Extent<Invoice>() select new { Id = i.Id, Code = i.Code, ContactDescription = i.Contact.Description, Prices = i.Invoiceitems.Sum(p=> (p.Quantity*p.Price)), DocumentDate = i.DocumentDate };is it possible to make such sum?