Note that there are some explanatory texts on larger screens.

plurals
  1. POIs this 'layering' of my web-service correct? Can it be improved?
    text
    copied!<p>I am writing a Web Service to retrieve Invoice information from a database table. The specifics are as follows:<br> I intend to give <code>InvoiceAgentId</code> as input and retrieve <code>PayerId</code>,<code>PayerName</code>, <code>EffDate</code> and <code>InvoiceAgentId</code>.<br> Now,<br> 1. In the <code>InvoiceInfoSearch.asmx.cs</code> file I have the <code>WebMethod</code> ... <code>GetInvoiceInfo</code><br> 2. I have the DTO objects <code>InvoiceInfoRequest</code> and <code>InvoiceInfoResponse</code><br> 3. I have the BusinessLayer manager class <code>InvoiceSearchmanager</code><br> 4. I have the DAL <code>InvoiceInfoDAL</code> </p> <p>The web method in point #1 instantiates the <code>InvoiceSearchManager</code> class and calls the <code>GetInvoiceInfo</code> method in the manager by passing the <strong><code>InvoiceInfoRequest</code></strong>. Then the manager method instantiates <strong><code>InvoiceInfoDAL</code></strong> and calls the <strong><code>GetInvoiceInfo</code></strong> method in the DAL by passing the <strong><code>InvoiceInfoRequest</code></strong>. In the DAL method the <strong><code>InvoiceInfoResponse</code></strong> is instantiated and populated with retrieved record set and then propagated back to web method.</p> <p>My questions:<br> 1. Can <strong>both the</strong> <code>InvoiceInfoRequest</code> and <code>InvoiceInfoResponse</code> DTO classes have the exact same members? In my case <code>PayerId</code>,<code>PayerName</code>, <code>EffDate</code> and <code>InvoiceAgentId</code>.<br> 2. Is this layering correct? Can it be bettered?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload