在MVC3中查询LINQ [英] Query for LINQ in MVC3

查看:55
本文介绍了在MVC3中查询LINQ的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨..

我正在MVC3中工作,并且只是从它开始.我有一个问题,不知道如何解决.我有3个表,我想从3个表中获取数据.而且我不知道如何从这些表中获取数据.

表格

1)Project_Master

Hi..

I am working in MVC3 and just start with it. I have one problem and don''t know how to solve. I have 3 tables and i want data from 3 tables. And i don''t know how to get data from these tables.

TABLES

1) Project_Master

推荐答案

var pageObject = (from t1 in table1
                  join t2 in table2 on t1.filed equals t2.field
                  join t3 in table3 on t2.filed equals t3.filed
                  Select new(t1.field,t2.field,t3.field.....)


这篇关于在MVC3中查询LINQ的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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