ssteenkiste / nettiers

Automatically exported from code.google.com/p/nettiers
1 stars 0 forks source link

ViewDataSource in ASP.NET not retrieving data #346

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Create a DataSource that gets data from a view (I used MSSQL) in Asp.Net 
Nettiers Website project.
Like
<data:VwSomeViewDataSource ID="VwSomeViewDataSource1" runat="server" 
SelectMethod="GetAll">
</data:VwSomeViewDataSource>
bind it to a EntityGrid (or any grid) and run the project.
There is no data retrieved.

What is the expected output? What do you see instead?
Expect to get the data from server.

What version of .netTiers and CodeSmith are you using?
Using 2.3-r851 and CodeSmith 5.2

Please provide any additional information below.
It worked in version 2.2

Original issue reported on code.google.com by dpeha...@gmail.com on 28 Sep 2010 at 9:09

GoogleCodeExporter commented 9 years ago
Where you able to step through this and debug this?

Original comment by bniemyjski on 28 Sep 2010 at 10:52

GoogleCodeExporter commented 9 years ago
Btw when i tryed EntityDataSource with the type of VwSomeViewData and its 
provider i got the data requested.

But when i use the VwSomeViewDataSource it gets into 
BaseDataSource

private IList<Entity> GetCachedData(IDictionary values, out int count)
and calls 
entityList = GetSelectData(values, out count);

and ends up in   
protected virtual IList<Entity> GetSelectData(IDictionary values, out int count)
        {
            count = 0;
            return null;
        }
and not the correct one (I think it should go into ReadOnlyDataSource that 
calls the right provider?)

Original comment by dpeha...@gmail.com on 28 Sep 2010 at 11:59

GoogleCodeExporter commented 9 years ago
If you apply the following patch does this resolve the issues for you?
http://code.google.com/p/nettiers/issues/detail?id=333

Original comment by bniemyjski on 5 Oct 2010 at 10:33

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I can confirm this.. an override method is missing in ReadOnlyDataSource.. 

Please see http://community.codesmithtools.com/nettiers/f/16/t/11573.aspx

This change can be made to the WebLiberary\Data\BaseDataSource.cst

@@ -1429,8 +1429,7 @@
        /// additional data retrieval functionality.</remarks>
        protected virtual IList<Entity> GetSelectData(IDictionary values, out int count)
        {
-           count = 0;
-           return null;
+           return GetSelectData(out count);
        }

        /// <summary>

or suitable override methods need to be added to ReadOnlyDataSource and 
CustomDataSource

Original comment by vaibhavk...@gmail.com on 30 Nov 2010 at 8:51

GoogleCodeExporter commented 9 years ago
Hello,

This has been fixed in revision 858 of the templates. This can be downloaded 
here (http://community.codesmithtools.com/nightly/NetTiers/).

Thanks
-Blake Niemyjski

Original comment by bniemyjski on 30 Nov 2010 at 10:51

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 7 Jan 2011 at 2:44