本文介绍了EntitySpaces 2012查询以选择Distinct Rows的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我正在使用EntitySpaces 2012架构,该架构提供ORM映射和内置方法,使用它的库编写SQL查询(就像LINQ to SQL一样)。问题是,我无法使用EntitySpaces Select Query从表中选择不同的行。目前,我的工作如下 DataTable dt = new 数据表(); ActualData objAct = new ActualDataQuery(); objAct.Select(objAct.Year.Distinct); dt = objAct.LoadDataTable(); if (dt.Rows.Count > 0 ) { FillCombo(dt); } 我在我的数据表对象加载的行上也设置了一个断点,它显示了多个不同的行存在多个时间(意味着明显不起作用)。 http://i.stack.imgur.com/ RXYiA.jpg [ ^ ] 我还查看了EntitySpaces的完整文档,但没有关于distinct关键字的内容。此外,我在互联网上找不到与此问题相关的任何内容,因为EntitySpaces2012没有论坛。任何帮助都将非常感激!解决方案 I am using EntitySpaces 2012 architecture which provides ORM mapping and built-in methods to write your SQL query using it's libraries (just like LINQ to SQL). The problem is, I cannot select distinct rows from a table using EntitySpaces Select Query. Currently, I am doing it as follows DataTable dt = new DataTable();ActualData objAct = new ActualDataQuery();objAct.Select(objAct.Year.Distinct); dt = objAct.LoadDataTable();if (dt.Rows.Count > 0){ FillCombo(dt);}I have put a breakpoint as well on the line where my datatable object is getting load, and it is showing that the distinct rows are present there multiple times (means distinct not working).http://i.stack.imgur.com/RXYiA.jpg[^]I have also go through the complete documentation of EntitySpaces but there's nothing regarding distinct keyword. Also I found nothing on the internet related to this problem as there's no forum for EntitySpaces2012. Any help would be hugely appreciated! 解决方案 这篇关于EntitySpaces 2012查询以选择Distinct Rows的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-19 08:45