Click here to Skip to main content
15,889,176 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Entity Framework : Get original Values for each object's property Pin
Richard Deeming10-Aug-15 5:54
mveRichard Deeming10-Aug-15 5:54 
GeneralRe: Entity Framework : Get original Values for each object's property Pin
Eddy Vluggen10-Aug-15 5:51
professionalEddy Vluggen10-Aug-15 5:51 
GeneralRe: Entity Framework : Get original Values for each object's property Pin
Richard Deeming10-Aug-15 5:56
mveRichard Deeming10-Aug-15 5:56 
GeneralRe: Entity Framework : Get original Values for each object's property Pin
satc10-Aug-15 6:10
satc10-Aug-15 6:10 
GeneralRe: Entity Framework : Get original Values for each object's property Pin
Richard Deeming10-Aug-15 6:17
mveRichard Deeming10-Aug-15 6:17 
Questionvb coding Pin
Member 118868934-Aug-15 21:48
Member 118868934-Aug-15 21:48 
AnswerRe: vb coding Pin
Richard MacCutchan4-Aug-15 22:21
mveRichard MacCutchan4-Aug-15 22:21 
QuestionSQL Linq, Sum of multiple columns Pin
jkirkerx4-Aug-15 7:23
professionaljkirkerx4-Aug-15 7:23 
Well in plain TSQL it was pretty simple to calc the total amount of taxable items.
SQL
SELECT 
  SUM((qty * Price) - (qty * InstantSavings))
  FROM ShoppingCart
  WHERE SessionID = @SessionID 
  AND Taxable=1
I've gotten this far, pretty sure I'm on the right track here.
But I don't understand where "totals" come from in my statement. I mean yes I put it there because multiple examples used it, but the examples were just snippets.
I simply don't get it.
VB
Dim pValue As Decimal = 0
Using context As New DBContext()

   Dim totals as what?
   pValue = _
   (
      From sc In context.ShoppingCart
      Where sc.SessionID = p_sessionID _
      And sc.Taxable = True
      Group sc By sc.SessionID Into totals()
      Select
     {
       total = totals.Sum(Function(m) (m.Qty * m.Price) - (m.Qty * m.InstantSavings))
     }
   )

  End Using

AnswerRe: SQL Linq, Sum of multiple columns Pin
jkirkerx4-Aug-15 8:20
professionaljkirkerx4-Aug-15 8:20 
Questionsql server 2008 how to pivot Login and logOut Pin
Member 118832203-Aug-15 14:26
Member 118832203-Aug-15 14:26 
AnswerRe: sql server 2008 how to pivot Login and logOut Pin
Mycroft Holmes3-Aug-15 14:38
professionalMycroft Holmes3-Aug-15 14:38 
GeneralRe: sql server 2008 how to pivot Login and logOut Pin
Member 118832203-Aug-15 15:05
Member 118832203-Aug-15 15:05 
GeneralRe: sql server 2008 how to pivot Login and logOut Pin
Richard MacCutchan3-Aug-15 21:08
mveRichard MacCutchan3-Aug-15 21:08 
QuestionRe: sql server 2008 how to pivot Login and logOut Pin
Eddy Vluggen3-Aug-15 21:29
professionalEddy Vluggen3-Aug-15 21:29 
QuestionSQL Linq, Bulk Transfer substitute Pin
jkirkerx3-Aug-15 8:02
professionaljkirkerx3-Aug-15 8:02 
Answer[solved] Pin
jkirkerx3-Aug-15 9:02
professionaljkirkerx3-Aug-15 9:02 
Questionsyntax insert in to Pin
Member 1060310631-Jul-15 22:54
Member 1060310631-Jul-15 22:54 
AnswerRe: syntax insert in to: Repost Pin
Richard MacCutchan31-Jul-15 23:07
mveRichard MacCutchan31-Jul-15 23:07 
QuestionBasic math, adding numbers, 2 methods produce different results Pin
jkirkerx30-Jul-15 11:15
professionaljkirkerx30-Jul-15 11:15 
AnswerRe: Basic math, adding numbers, 2 methods produce different results Pin
PIEBALDconsult30-Jul-15 11:24
mvePIEBALDconsult30-Jul-15 11:24 
AnswerRe: Basic math, adding numbers, 2 methods produce different results Pin
jkirkerx30-Jul-15 12:22
professionaljkirkerx30-Jul-15 12:22 
AnswerRe: Basic math, adding numbers, 2 methods produce different results Pin
Richard Deeming31-Jul-15 0:36
mveRichard Deeming31-Jul-15 0:36 
GeneralRe: Basic math, adding numbers, 2 methods produce different results Pin
jkirkerx31-Jul-15 11:36
professionaljkirkerx31-Jul-15 11:36 
QuestionVB.net 2010,Windows Desktop Excel ADODB Provider cannot be found Pin
QuickBooksDev30-Jul-15 8:12
QuickBooksDev30-Jul-15 8:12 
GeneralRe: VB.net 2010,Windows Desktop Excel ADODB Provider cannot be found Pin
PIEBALDconsult30-Jul-15 8:43
mvePIEBALDconsult30-Jul-15 8:43 

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.