none
LINQ2SQL - SUM() RRS feed

  • Question

  • hello,

    let's say I have a simple table in my database which has 3 columns:
    ID which is a primary key
    Number which is an int
    Name which is a varchar

    Now I define my datacontext in my app, and do a LINQ query:

    var query = from p in data.Table
    select new
    {
    Sum = p.Number.Sum(),
    Name = p.Name
    };
    the thing is, why there is no Sum() avaiable in my example or any other extension methods?
    Thursday, October 22, 2009 6:21 PM

Answers