This is a migrated thread and some comments may be shown as answers.

Service Wizard should create BindingList CRUD methods

3 Answers 41 Views
Feature Requests
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jörgen
Top achievements
Rank 1
Jörgen asked on 18 Apr 2013, 05:21 PM
I have a N-tier appilcation that uses DataAccess ORM and a WCF Plain service (created by DataAccess ORM)
The WCF Service exposes a Read<tablename>s method that returns an Array of dto objects.
I want to databind against a grid Control and then I cannot use an Array. I should use a BindingList for things to work properly.

The WCF Plain serivce that is created by DataAccess ORM service wizard should have an option to create methods that uses BindingList
instead of arrays in CRUD methods.

3 Answers, 1 is accepted

Sort by
0
Jörgen
Top achievements
Rank 1
answered on 18 Apr 2013, 05:23 PM
As is today I have to write code in my Windows Form that converts the Array to a BindingList Before I can databind to my grid Control.
When I want to save I have to convert the BindingList back to an Array.
0
Viktor Zhivkov
Telerik team
answered on 19 Apr 2013, 08:08 AM
Hi Jörgen,

You can have the desired behaviour already by tweaking a configuration in the Add Service Reference dialog. Currently Add OpenAccess Service wizard generates only server side code and the code that you are referring sounds like client side and it is handled by different wizard.

Using Add Service Reference dialog in Visual Studio you can set how to interpret the IEnumerable<T> return type. To do so please:
  1. Open Add Service Reference dialog
  2. Discover and select the hosted service
  3. Click on Advanced... button
  4. Change the value of the combobox under Data Type, Collection Type to the desired type. You can do the same for Dictionary types too
  5. Then apply the configuration by clicking OK
  6. Generate the client side code by clicking OK on the Add Service Reference dialog.

This should enable you to use BindingLists in your client code without any overhead.

Regards,
Viktor Zhivkov
the Telerik team
Using Encrypted Connection Strings with Telerik OpenAccess ORM. Read our latest blog article >>
0
Jörgen
Top achievements
Rank 1
answered on 19 Apr 2013, 02:54 PM
Correct. I've found it and changed the configuration of my WCF service it now works as I want. Problem Solved.
Tags
Feature Requests
Asked by
Jörgen
Top achievements
Rank 1
Answers by
Jörgen
Top achievements
Rank 1
Viktor Zhivkov
Telerik team
Share this question
or