Linq和数据源对象 [英] Linq and Data Source Object

查看:80
本文介绍了Linq和数据源对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个类,它将是我项目中的数据源对象
(报告 - 菜单文件 - >新 - >项目 - > Visual C# - >报告 - > ReportsApplication [VS2008] )。
我添加了 - >新项目 - > 'Linq to SQL'和LinqToSQL Designer上的表格。我的问题是:
如何将这些数据传递给我的班级(数据源对象)?
或者如何使用Linq进行报告?

发票ka​​zik

I have class, which will be a Data Source object in my project
 (Report - Menu File->New->Project->Visual C#->Reporting-> ReportsApplication [VS2008]).
I added -> new Item -> 'Linq to SQL' and droped tables on LinqToSQL Designer. And my question is:
How to deliver this data to my class (Data Source Object)?
Or how to make Report with using Linq?

regards
kazik

推荐答案

报告将映射到您将生成的特定数据源。在这些数据源中将是一个单独的类,它暴露公共属性/方法,它将提取目标数据并返回信息/列表。

这个过程不是一个向导过程,而是一个手工完成的过程。我已经做了。我的工作基于以下网站:使用ReportViewer控件的ASP.NET 2.0 。它甚至没有提到Linq,但是他们在哪里创建对象数据源是将linq代码插入类中的位置。
The report will map to specific DataSource(s) which you will generate. Within those datasources will be a individual class which exposes public properties/methods which will extract the target data and return the information/lists back.

This process is not a wizard process but one done more by hand. I have done it. I based my work off of this web site: Working with ReportViewer control Of ASP.NET 2.0 . It doesn't even mention Linq but where they create the object datasources is where you insert the linq code into the classes.


这篇关于Linq和数据源对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆