Click here to Skip to main content
15,890,438 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to call the load runner (LR) controller from visual studio Pin
Richard MacCutchan18-Jul-17 23:23
mveRichard MacCutchan18-Jul-17 23:23 
AnswerRe: How to call the load runner (LR) controller from visual studio Pin
BillWoodruff19-Jul-17 1:29
professionalBillWoodruff19-Jul-17 1:29 
QuestionSum columns from joined tables to get a calculated value using linq to SQL Pin
Member 1246241116-Jul-17 8:54
Member 1246241116-Jul-17 8:54 
AnswerRe: Sum columns from joined tables to get a calculated value using linq to SQL Pin
BillWoodruff16-Jul-17 11:25
professionalBillWoodruff16-Jul-17 11:25 
GeneralRe: Sum columns from joined tables to get a calculated value using linq to SQL Pin
Member 1246241117-Jul-17 3:01
Member 1246241117-Jul-17 3:01 
AnswerRe: Sum columns from joined tables to get a calculated value using linq to SQL Pin
Nathan Minier17-Jul-17 1:13
professionalNathan Minier17-Jul-17 1:13 
AnswerRe: Sum columns from joined tables to get a calculated value using linq to SQL Pin
Richard Deeming17-Jul-17 1:27
mveRichard Deeming17-Jul-17 1:27 
GeneralRe: Sum columns from joined tables to get a calculated value using linq to SQL Pin
Member 1246241117-Jul-17 12:15
Member 1246241117-Jul-17 12:15 
var res = (from a in dc.orders
join b in dc.orderLines on a.orderId equals b.fk_orderId
join c in dc.foodItems on b.fk_foodId equals c.foodId
where a.fk_custId == cID
group new { a,c,b } by a into g
select new
{
OID1 = g.Key.orderId,
date1 = g.Key.date,
val = g.Sum(x => x.c.price * x.b.quantity) + g.Select(d => d.b.quantity)
});

I have created the above query. Now the only problem is in the last line (val = g.Sum(x => x.c.price * x.b.quantity) + g.Select(d => d.b.quantity)).

It shows error (Operator + cannot be applied to operand of type decimal? and System.Collection.Generic.IENumerable<int?>

Can you please help.
GeneralRe: Sum columns from joined tables to get a calculated value using linq to SQL Pin
Mycroft Holmes17-Jul-17 14:18
professionalMycroft Holmes17-Jul-17 14:18 
GeneralRe: Sum columns from joined tables to get a calculated value using linq to SQL Pin
Richard Deeming18-Jul-17 0:38
mveRichard Deeming18-Jul-17 0:38 
AnswerRe: Sum columns from joined tables to get a calculated value using linq to SQL Pin
Member 1246241118-Jul-17 10:56
Member 1246241118-Jul-17 10:56 
QuestionWriting to UI Thread in a Real time Application Pin
andycruce16-Jul-17 2:41
andycruce16-Jul-17 2:41 
AnswerRe: Writing to UI Thread in a Real time Application Pin
Gerry Schmitz16-Jul-17 4:49
mveGerry Schmitz16-Jul-17 4:49 
AnswerRe: Writing to UI Thread in a Real time Application Pin
Dave Kreskowiak16-Jul-17 5:28
mveDave Kreskowiak16-Jul-17 5:28 
AnswerRe: Writing to UI Thread in a Real time Application Pin
Alan N16-Jul-17 8:31
Alan N16-Jul-17 8:31 
SuggestionRe: Writing to UI Thread in a Real time Application Pin
BenScharbach12-Aug-17 10:17
BenScharbach12-Aug-17 10:17 
QuestionPaste CF_ENHMETAFILE=14 image file Pin
manuellopes14-Jul-17 11:32
manuellopes14-Jul-17 11:32 
SuggestionRe: Paste CF_ENHMETAFILE=14 image file Pin
Richard MacCutchan14-Jul-17 20:35
mveRichard MacCutchan14-Jul-17 20:35 
GeneralRe: Paste CF_ENHMETAFILE=14 image file Pin
manuellopes15-Jul-17 6:08
manuellopes15-Jul-17 6:08 
GeneralRe: Paste CF_ENHMETAFILE=14 image file Pin
Richard MacCutchan15-Jul-17 6:22
mveRichard MacCutchan15-Jul-17 6:22 
GeneralRe: Paste CF_ENHMETAFILE=14 image file Pin
manuellopes15-Jul-17 6:33
manuellopes15-Jul-17 6:33 
GeneralRe: Paste CF_ENHMETAFILE=14 image file Pin
Richard MacCutchan15-Jul-17 6:53
mveRichard MacCutchan15-Jul-17 6:53 
GeneralRe: Paste CF_ENHMETAFILE=14 image file Pin
manuellopes15-Jul-17 7:38
manuellopes15-Jul-17 7:38 
GeneralRe: Paste CF_ENHMETAFILE=14 image file Pin
Richard MacCutchan15-Jul-17 20:30
mveRichard MacCutchan15-Jul-17 20:30 
QuestionServicePointManager and TLS1.2 with Gmail Pin
jkirkerx13-Jul-17 6:34
professionaljkirkerx13-Jul-17 6:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.