Is this the “bundle” of my web service right? Is it possible to improve?

I am writing a web service to retrieve account information from a database table. Specificity is the following:
I intend to give InvoiceAgentIdas input and retrieval of PayerId, PayerName, EffDateand InvoiceAgentId.
Now,
1. In the file InvoiceInfoSearch.asmx.cs, I have WebMethod... GetInvoiceInfo
2. I have DTO InvoiceInfoRequestand InvoiceInfoResponse
3. I have a BusinessLayer manager class InvoiceSearchmanager
4. I have DALInvoiceInfoDAL

The web method in paragraph 1 creates an instance of the class InvoiceSearchmanagerand calls the method GetInvoiceInfoin the manager, passing . The manager method then instantiates and calls the method in the DAL, passing in . In the DAL method, it is created and populated with a restored set of records, and then distributed back to the web method. InvoiceInfoRequest InvoiceInfoDAL GetInvoiceInfo InvoiceInfoRequest InvoiceInfoResponse

My questions are:
1. Can classes InvoiceInfoRequest and InvoiceInfoResponseDTO have the same elements? In my case PayerId, PayerName, EffDateand InvoiceAgentId.
2. Is this bundle correct? Is it possible to improve?

+3
source share
2 answers

. DAL Business. . , - -, DAL.

, unit test -?

DAL - ( ). - DAL ( ) , DAL.

DAL unit test -.

() -.

+2

, :

Controller (eg your *.asmx.cs) -> 
  Business Services ->
    DAL

. , , (, ) spring java. , # .

0

Source: https://habr.com/ru/post/1754542/


All Articles