Note that there are some explanatory texts on larger screens.

plurals
  1. POIRepository<> and SOA together
    primarykey
    data
    text
    <p>i need some helps on using IRepository&lt;> pattern and SOA together.</p> <p>i'm developing an accounting application which includes very complex business logics. currently i'm using the IRepository as a DAL which only do the basic CRUD + things like providing an IQueryable interface, some caching features and so on.</p> <p>on top of it, i have a BusinessLogic layer which play the role of Service or Facade layer (are they the same thing?). all of the application logics encapsulated here as methods which will be used by Presentation layer.</p> <p>as i said all basic CRUD are placed in repositories but further that take place in BusinessLogic, for example we may only have these basic methods in our Account repository :</p> <pre><code>public class AccountRepository { public IList&lt;Accounts&gt; GetAll() { ... } public Accounts Get(int id) { ... } public IList&lt;Accounts Where(Func&lt;Accounts,bool&gt; criteria) { ... } public Accounts Add(Accounts item) { ... } } </code></pre> <p>but to get an account with a specific number we would have a service like this :</p> <pre><code>public class AccountService { AccountRepository repos; public Accounts FindByNumber(int AccountNumber) { return repos.Where(o=&gt;o.AccountNumber == AccountNumber).FirstOrDefault(); } } </code></pre> <p>AccountService also could have a CreateAccount() method which add multiple entities (an account, an owner and ...) by using entities repository and in a single transaction.</p> <p>now i want to know am i using them in a right way ? or did i miss some points ? </p>
    singulars
    1. This table or related slice is empty.
    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.
 

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