我有一个方法,返回一组帐户
原文链接:https://www.f2er.com/vb/255034.htmlPublic Shared Function GetAllNotesByUser(ByVal UserID As Guid) As Account (??) Using db As New MyEntity Dim query= (From A In db.Account _ Where A.aspnet_Users.UserId = UserID _ Select A) Return query End Using End Function
然后,我想将此传递给另一个函数来计算集合中所有帐户的总计.最好的做法是返回一个Ienumerable,一个通用列表,我只是不确定什么最适合LINQ和实体框架.