Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding new entities in webforms
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
ASP.NET
OS:
Vista
Divers
Thread ID:
01238523
Message ID:
01238782
Vues:
10
Craig,

>I am working through the jumpstarts for web forms and building on them with my own code.
>
>The jump start is using a mix of Entity and DataSet methods, just wondering if there are specific reasons?
>I am trying to use only the Entity methods and hitting an issue with adding.
>
>I have a webform, with a button, in the codebehind for the button click I want to add a new records for editing.
>I don't seem to be able to call NewEntity() on the business object without getting an "Object reference is not set to an instance of an object" error.
>
>I should probably note that the display and navigation in the form(using Entities) all works perfectly.
>
>I can't find any guidance in the help on this.

We are in the process of documenting more of a pure entity approach in the Developer's Guide as well as adding features to the next version of MM .NET that allow you to take a complete entity-based approach.

Try calling GetEmptyDataSet() before calling NewEntity() to see if that gets rid of the error.

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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform