Dataset - Forms vs Web

I've noticed a couple of differences between the forms and web versions of datasets with the Beta 2, and was wondering if these are deliberately different and will stay that way, or just due to it being in a beta stage.

When you create a dataset object (Add -> New Item -> DataSet):

1.  In forms, the xxDataset.Designer.cs code behind file is generated and placed in the project. In asp.net, it appears to be generated on demand

2. Delete Method. In forms, the xxxTableAdapter.delete() methods take the original version of _every_ field as a parameter, which is somewhat difficult. In the web version, it takes the primary key...

Thanks


Answer this question

Dataset - Forms vs Web

  • jfkrueger

    1.  This is working as designed.  In a Winforms project, the source files are there so they can be compiled from the designer.  In a WebForm, the code files are generated on-demand when the XSD is placed in the App_Code directory.  The compilation actually happens at runtime.

    2.  I believe you can use the overload of Delete() that takes the primary key from within a Windows app as well.  The DbDirectMethods are available in both a WinForms and WebForms app.  However, the DbDirectMethods are especially useful in a WebForms app for associating with the ObjectDataSource server control.

    Hope this helps,
    Bradley


  • Dataset - Forms vs Web