A
A
Alec Onim2016-01-29 14:09:26
.NET
Alec Onim, 2016-01-29 14:09:26

What is the best way to bind a WCF application to a WPF project?

Hello everyone, now I'm doing one test task and I need the following:
Develop a wcf service that simulates work with a list of certain objects, namely, getting all objects, adding, deleting, searching by fields.
Make a wpf client application for this service.
I made the service itself, looked, everything works, returns as it should, but the following questions arose before me:

  • Did I do the right thing by placing the definition of the class of the object itself from the list in the wcf service project? I placed the list class with all the operations in the same place.
  • Как правильно добавить ссылку на wcf-сервис в wpf приложение? сейчас я скопировал адрес из wcf-test-client и вставил как service reference в wpf, в принципе работает, но я боюсь, что это неверный путь и может быть после передачи моего решения проверяющим, у них оно банально не заработает.

Буду признателен за любую помощь/ссылки на статьи/примеры.
Спасибо!:)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Makarov, 2016-01-29
@Nipheris

Did I do the right thing by placing the definition of the class of the object itself from the list in the wcf service project? I placed the list class with all the operations in the same place.

Depends on your assignment. In principle, for such a test, I see no reason to bother with dividing into projects.
You need this action first of all to generate the client code. Where specifically to connect, as far as I remember, you can specify in the client constructor.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question