Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is it normal practice?
Message
 
À
21/02/2008 11:56:29
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01294820
Message ID:
01298017
Vues:
29
Sam

>I have an SQL table that has close to 100 columns. Some users need to reference all columns, but other users need to only reference a few columns in that table.
>
>Is it normal practice in MM .NET v2.4 to create multiple business objects and business entities and stored procedures for the same table so that only the columns needed by each user are referenced, or is it better to only use one set of objects that use all columns but only display the columns needed in the user interface?
>
>It looks like either approach will work, but dealing with 100 columns when only a few columns are needed seems like a waste of resources, but creating and keeping track of multiple business objects, business entities, and stored procedures is no piece of cake either.

I replied to this message via private e-mail, but will post my response for all you lurkers!

In the upcoming release of MM.NET 3.5, we make it far easier for a business object to work with entities of different shapes (all columns, just a few columns, etc.). Many business object methods allow you to specify a generic type when calling the method. For example:
this.GetEntity<OrderEntityList>GetEntity()
By default, GetEntity() returns an entity of the default type, but the above overload allows you to specify the type.

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform