帮助了解LINQ to SQL [英] Help understanding linq to sql

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

问题描述

我有一个linq查询,我需要将其转换为等效的sql.

Hi I have a linq query that I need to convert to its sql equivlent.

var listItems = from r in EntityContext.Context.RateList
                               where r.RatingTypeId == RatingtypeId
                               && r.RateList2.RateListId == iParentRateListId
                               select new
                               {
                                   r.RateListId,
                                   r.RateListName
                               };


只是不了解&& r.RateList2在这里执行.
在此先感谢.


Just dont understand what the && r.RateList2 is doing here.
Thanks in advance.

推荐答案

了解&& r.RateList2在这里

&& ->向WHERE子句添加多个条件
r.RateList2->看起来r对象具有这样的实现.这是一个可供使用的属性.
understand what the && r.RateList2 is doing here

&& -> Adding multiple condition to WHERE clause
r.RateList2 -> looks like r object has such implementation. It''s a property exposed to be used.


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

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