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

Some question about WCF Endpoint

3 Answers 116 Views
Web Services
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Zbigniew Kozłowski
Top achievements
Rank 1
Zbigniew Kozłowski asked on 23 Apr 2010, 08:09 AM
Hi,
ive started to use WCF and ORM, so ive created with the wizard all stuff needed, but now i have some problems and asks:

1. Why wizard can only created service for WEB? im using standalone WCF so i had to created web, than created with wizard files, than copy them to mine project and remove SVC file, maybe you could add a checkbox, and if its for standalone just dont create SVC file?? Because its working just fine when i copy them.
2. Ive got in standard all CRUD functions but, i cant search what i need (was also in another post by someone else)
3. Read is taking all reference also, is there a way to get only specific fields?? Because now when i got a table with 6 references and a lot of rows it takes to long to send them over WCF and i only need for example ID,description and date, not all 30 fields, and 6 other tables.

AND most frustrating for me, but related to ORM reverse mapping:
1. I really want to throw mine PC over a window when i make reverse mapping, because, ive got over 80 tables, few of them got 15 references, and for example 6 of them are referenced for same table like: mainmanager, mainprogrammer,programmer etc. And ive got in wizard user,user1,user2,user3,user4,user5.... i mean wtf? they got their names why cant u make for example mainmanagerUser,mainprogrammerUser etc? or when i change them manually (not a problem IF I MAKE IT ONCE) to save this definitions, because now when i update something in mine database i need to change everything again manually, same for autoinc with mysql.
2. CS files another stupid thing in mine opinion, its creating just fine when u got it first time. Than you make update to your database add field, remove field, change name etc just normal operation in every project. And cs file only got new fields, removed are still there if u change type its not changed etc, etc,etc I know that you are making it because user can add something to this files and you dont whant to touch it, but i think 80% users got their own functions in other files. So basically you need to delete all created by ORM files and create them again with wizard, OHH wait u can't because you are source controlled!! so you need to del files, checkin and than create. It would be easy to resolve this problem, for example make user regions, so if there is #region DONT TOUCH, you wont touch it, and replace everything else, or make another checkbox "Replace all files".

Really both Data Services Wizard and ORM are great tools, really i would love to use them, but for me its only good if you got finished database, and you make it all only once, and we all know its not possible, because everything is changing.
And so after few days of playing with these tools i think im going back to mine custom ORM :(
But keep up the good job;) i really like your controls and i hope you will read mine post and maybe do something with it ;)

Regards,
Zbigniew Kozłowski

3 Answers, 1 is accepted

Sort by
0
PetarP
Telerik team
answered on 23 Apr 2010, 01:51 PM
Hello Zbigniew Kozłowski,

1. That is a great idea. Since we are planning to release a new version of the DSW soon your feature will most probably not make it for that release. However we will do our best to implement it for the next one.
2. Can you please clarify the question a little bit as we can not quite understand what exactly is failing.
3. Another good idea that we will discuss and possibly implement for the future.
4. That is a behavior of the old reverse mapping wizard. Since Q1 2010 we have introduced a new visual designer that handles the reverse mapping scenarios that has those issues fixed.
5. You are correct that we are intentionally not overriding the file containing the properties definition in order to prevent the loss of custom code you might have implemented there. You can find the entire code generated in your file that contains the field declaration. It is in the form of commented code in the bottom of the file. You can copy it and replace the properties declaration with it without the need of deleting the file.
I hope that helps.

Kind regards,
Petar
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Zbigniew Kozłowski
Top achievements
Rank 1
answered on 23 Apr 2010, 02:20 PM
Ad.2 i mean that i can ReadAll, but cant specify for example where customer.city = "New York";  Its only possible when i get it on client and than make linq query with the result, but the thing is, all data is going over intranet/internet to the client :/
Ad.4 im using latest ORM and Data Service Wizard
Ad.5 i know i can make some thing manually, but it would be much easier with checkbox "replace all" and i think its not so much coding to make it :/

And i got new problems, after wizard created for me all CRUD methods i cant update tabels :( for example

WebService.Contact contact = new WebService.Contact();
contact.Id = _contactId;
contact.Description = descriptionTextBox.Text;
contact.FullDescription = fullDescriptionTextBox.Text;
contact.Comments = commentTextBox.Text;
contact.Phone1 = phone_1TextBox.Text;
contact.Phone2 = phone_2TextBox.Text;
contact.Www = wwwTextBox.Text;
contact.Fax = faxTextBox.Text;
contact.Email1 = emailTextBox.Text;
contact.EmailDomain = emailDomainTextBox.Text;

WebService.UpdateContact(contact);

this is working just fine, but than ive got tabel with contactaddresses (one-to-many) and i try to update it:
WebService.Contactaddress contactAddress = new WebService.Contactaddress();
contactAddress.ContactID = _contactId;
contactAddress.Id = _contactAddressId;
contactAddress.Address1 = address_1TextBox.Text;
contactAddress.Address2 = address_2TextBox.Text;
contactAddress.Address3 = address_3TextBox.Text;
contactAddress.City = cityTextBox.Text;
contactAddress.ContactAddressType = Enums.ContactAddressType.Main.ToString();
contactAddress.Country = countryTextBox.Text;
contactAddress.Post = postTextBox.Text;
contactAddress.Status = Enums.Status.Active.ToString();
contactAddress.ZipCode = zipCodeTextBox.Text;

EasyCRMService.UpdateContactaddress(contactAddress);

throws me an exception that ContactId cant be null... and its not, i tried to debug it so ive put break point inside your function UpdateEntity<T>(T entity), and i can see the id there, so its getting it :/ What can be wrong? Its mine fault or its a bug?

0
PetarP
Telerik team
answered on 28 Apr 2010, 04:39 PM
Hello Zbigniew Kozłowski,

Ad.2 Are you doing this trough a stored procedure? Maybe you should alter the procedure to return only several records based on a certain search criteria. This will move the filtering on the server side.
Ad.4 A problem will occur if you are using the old reverse mapping wizard. However if you are using the new Visual Designer such things should not happen.
Ad.5 The only way as for now is to choose a single file generation for each of your classes. This will result in your private fields and your public properties being generated in the same file thus the file will be overwritten each time you generate your classes. The option can be found in the options dialog of the Reverse mapping wizard under Source generation. The only thing you will need to do is remove the check from Generate Partial Classes option.

Can you please open the forward mapping wizard and check the Managed collection option for your contactaddresses property located in the contact class. This should fix your problem.

Greetings,
Petar
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Web Services
Asked by
Zbigniew Kozłowski
Top achievements
Rank 1
Answers by
PetarP
Telerik team
Zbigniew Kozłowski
Top achievements
Rank 1
Share this question
or