Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 13th, 2007, 10:41 AM
Authorized User
 
Join Date: Nov 2007
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Default data views using the architecture

hi. newbie here...i have a number of large complex forms, each of which feeds several related tables. i often need to view an index of each these forms, which will pull several fields from each of the respective related tables and present the data in a gridview. i prefer to use stored procs for data access. how would i model this for any given form, using the tbh architecture? it seems to produce one entity for each table. yet i don't want to populate an entity like that if i only need a couple of fields.

 
Old November 13th, 2007, 11:16 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

forumuser - it sounds to me like you're making a mistake in your approach. i personally feel that the entities should be directly mapped to a single table. of course, your BLL layer could work with combinations of related tables (in the same way that the order.cs in BLL/store operates. take a look at that (public static int InsertOrder and public static bool UpdateOrder) for inspiration/ideas. other than that, let me know if you find a method to work outside the norm as i'd be interested to see how this works in practice ;)

jimi

http://www.originaltalent.com
 
Old November 14th, 2007, 06:33 AM
Authorized User
 
Join Date: Nov 2007
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks jimi. i'll take a look at that. i hadn't read as far as chapter 9!

 
Old December 5th, 2007, 06:03 AM
Authorized User
 
Join Date: Nov 2007
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Default

raising this old chestnut again. i can't help feeling that it doesn't make sense to create say 30 objects, with *lots* of data, when all i want from the database is the ID field of a particular table. why not create a custom object with fields which match the gridview column requirements, create a stored proc to populate the object and bind the gridview. it's all readonly stuff and this would be *infinitely* more efficient than using an amalgam of standard objects, most of whose data i wouldn't actually need at that time.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Basic Architecture iceman90289 C# 2005 3 March 24th, 2008 10:53 PM
architecture MunishBhatia ASP.NET 2.0 Professional 3 October 6th, 2007 05:24 AM
Disconnected data architecture kumar_raj13 ADO.NET 1 December 6th, 2005 12:00 AM
converting Access 2000 views to Sql views matta Classic ASP Professional 1 January 26th, 2005 03:37 PM
Update Data through linked views innmurray SQL Server 2000 7 January 18th, 2005 05:23 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.