title: How to use Unit of Work in Domain Layer
body: <p>I'm trying to use the Unit of work pattern in My Service classes.
  <br />
  I have my CompanyService class</p>
  
  <pre><code>public class CompanyService: ICompanyService
  {
      private readonly ICompanyRepository _companyRepository;
  
      public CompanyService(ICompanyRepository companyRepository)
      {
          _companyRepository = companyRepository;
      }
  
      public void CreateCompany(Company company)
      {
          _companyRepository.Add(company);
          //I want to have unit of work commit here!!! 
          //unitofwork.commit(); 
      }
  
      public void UpdateCompany(Company company)
      { etc...}
  </code></pre>
  
  <p>How can i inject an instance of an UnitOfWork In my ServiceClass if my IUnitOfWork is in My Data Layer, and not in my Domain Layer? Should i have an IUnitOfWork in my Domain Layer? I just think this doesn't sound right...</p>