Ignore this.. got ObjectDataSource confused with a ObjectDataReader .. groan .
Regards , Ben > -----Original Message----- > From: Unmoderated discussion of advanced .NET topics. [mailto:ADVANCED- > [EMAIL PROTECTED] On Behalf Of Ben Kloosterman > Sent: Thursday, 7 July 2005 10:33 AM > To: [email protected] > Subject: Re: [ADVANCED-DOTNET] ASP.NET 2.0 ObjectDataSource poor design? > > Most OR Mappers don't work like this either ... It forces the class to > be inherited from a base class which is worse than the problem. > > ObjectDataSource is probably a poor mans objectspace which got pulled > from 2.0 and put in LongHorn , groan.. > > Ben > > > > > -----Original Message----- > > From: Unmoderated discussion of advanced .NET topics. > [mailto:ADVANCED- > > [EMAIL PROTECTED] On Behalf Of Luca Minudel > > Sent: Thursday, 7 July 2005 7:13 AM > > To: [email protected] > > Subject: [ADVANCED-DOTNET] ASP.NET 2.0 ObjectDataSource poor design? > > > > In a Business Layer with Busines Entities with CRUD Behaviors (has > > described here [1] at Cap. 'Defining Custom Business Entity Components > > with > > CRUD Behaviors') typically > > 1) the Update() method have zero parameters > > 2) the Update() method is in a Business Entity class say Author, while > the > > SelectAuthorsByXxx() methods that get filtered lists of authors is in > > another Business Entity say Authors class. > > > > But... ObjectDataSource: > > 1) don't let me set a method with zero parameters to UpdateMethod! > > 2) don't let me set SelectMethod and UpdateMethod from 2 different > > classes! > > > > To use ObjectDataSource in real world application I had do write a > wrapper > > like this: > > > > public static class AuthorsWrapperForObjectDataSource { > > public static List<Author> SelectAuthorsByState(string state, > string > > sortExpression) { > > return AuthorsList.GetAuthorsByState(state, sortExpression); > > } > > > > public static int UpdateAuthor(Author author) { > > return author.Update(); > > } > > } > > > > I have to write a wrapper for ObjectDataSource also when I have a > Business > > Layer with Busines Entities without CRUD Behaviors (has described here > [1] > > at Cap. 'Defining Custom Business Entity Components'). > > > > Am I missing the correct usage of ObjectDataSource or someone else > noted > > these ObjectDataSource limitations? > > > > TIA (luKa) > > > > http://nullabletypes.sf.net/ > > http://dev.luca.minudel.it/ > > http://www.luca.minudel.it/eng/ > > > > > > [1] Designing Data Tier Components and Passing Data Through Tiers, > > Microsoft, 2002 > > http://msdn.microsoft.com/library/default.asp?url=/library/en- > > us/dnbda/html/BOAGag.asp > > > > =================================== > > This list is hosted by DevelopMentor(r) http://www.develop.com > > > > View archives and manage your subscription(s) at > > http://discuss.develop.com > > =================================== > This list is hosted by DevelopMentor(r) http://www.develop.com > > View archives and manage your subscription(s) at > http://discuss.develop.com =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
