Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If I understand correctly you want to use the <code>Employee</code> action methods without being tied to <code>Employee</code> views. </p> <p>I would create a service layer in your application (maybe in a separate project) that deals with Employee logic. Then from your <code>Employee</code> controller and your <code>Timesheets</code> controller you call this <code>EmployeeService</code> service. </p> <p>This way your Business Logic (<code>EmployeeService</code>) is separated from your Presentation logic (<code>Employee</code> and <code>Timesheets</code> controllers and related views). So your controllers can use logic stored in <code>EmployeeService</code> and still utilize their own views for presentation.</p> <p>This in fact becomes a 2-tiered design. If your application is complex enough you might even separate your data access logic into separate layer - effectively making your application 3-tiered. </p> <p>A sample structure might be as follows.</p> <pre><code> Presentation Layer Project (PL) Controllers/ EmployeeController TimesheetsController Views/ Employee/ Timesheets/ ... Business Logic Layer Project (BLL) ViewModels/ Services/ ... Data Access Layer Project (DAL) Models/ Repositories/ ... </code></pre> <p>(Here PL would reference BLL and BLL would reference DAL project).</p> <p>This might give more information: <a href="https://softwareengineering.stackexchange.com/questions/135724/separating-data-access-in-asp-net-mvc">https://softwareengineering.stackexchange.com/questions/135724/separating-data-access-in-asp-net-mvc</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

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