public IEnumerable<IKarma> GetProjectsKarmaList() { var karmaList = new List<IKarma>(); using (var reader = Data.SqlHelper.ExecuteReader("SELECT id as ProjectId, SUM(points) Points FROM powersProject GROUP BY id")) { while (reader.Read()) { var karma = new Karma { ProjectId = reader.GetInt("ProjectId"), Points = reader.GetInt("Points") }; karmaList.Add(karma); } } return karmaList; }
public IEnumerable <IKarma> GetProjectsKarmaList() { var karmaList = new List <IKarma>(); using (var reader = Data.SqlHelper.ExecuteReader("SELECT id as ProjectId, SUM(points) Points FROM powersProject GROUP BY id")) { while (reader.Read()) { var karma = new Karma { ProjectId = reader.GetInt("ProjectId"), Points = reader.GetInt("Points") }; karmaList.Add(karma); } } return(karmaList); }