title: c# - ASP.NET web api controller not working when injecting service
body: <p>When i input interface/services my API is not get, but when i commented my interface/services, it works.
  ill try using different API with the same code as this and it works.</p>
  
  <p><strong>Controller</strong>:</p>
  
  <pre><code>    private readonly IUnitOfWorkAsync _unitOfWork;
      private readonly IDivMapItemListService _divMapItem;
  
      public DivMapItemListController(IUnitOfWorkAsync unitOfWork, IDivMapItemListService divMapItem)
      {
          _unitOfWork = unitOfWork;
          _divMapItem = divMapItem;
      }
  
      [HttpGet]
      [AllowAnonymous]
      [Route("api/item/list")]
      public IHttpActionResult DailyItemList()
      {
          _unitOfWork.BeginTransaction();
          try
          {
              var data = _divMapItem.DailyInsert();
  
              return Ok();
          }
          catch (Exception ex)
          {
              _unitOfWork.Rollback();
              return InternalServerError();
          }
      }
  </code></pre>
  
  <p><strong>Services</strong>:</p>
  
  <pre><code>public class DivMapItemListService : Service&lt;DivMapItemList&gt;, IDivMapItemListService
  {
      private readonly IRepositoryAsync&lt;DivMapItemList&gt; _repository;
  
      public DivMapItemListService(IRepositoryAsync&lt;DivMapItemLis&gt; repository) : base(repository)
      {
          _repository = repository;
      }
  
      public IEnumerable&lt;DivMapItemList&gt; DailyInsert()
      {
          try
          {
              var _currentDate = DateTime.Now.Date;
              int _lastTwoYears = _currentDate.Year - 2;
  
              var rawData = _repository.GetRepositoryAsync&lt;DivMapItem&gt;().DivMapItemListOpt(_lastTwoYears, _lastTwoYears).ToList();
  
              return rawData;
          }
          catch (Exception ex)
          {
              throw ex;
          }
      }
  }
  </code></pre>
  
  <p><strong>Interface</strong></p>
  
  <pre><code>    public interface IDivMapItemListService : IService&lt;DivMapItemList&gt;
      {
         IEnumerable&lt;DivMapItemList&gt; DailyInsert();
      }
  </code></pre>