title: Repository pattern and issue with base modal properties
body: <p>I have created .NET core API with repository pattern and dependency injections.</p>
  <p>This api uses already existing database and I have generated dbContext using scaffolding and issues starts with this.</p>
  <ul>
  <li><strong>The issue:</strong> I want to handle some common column data insertion from service layer, like <strong>CreationDateTime, CreationUserId</strong> etc.</li>
  <li>This works perfectly fine if we use code-first approach since it allows us to inherit base modal class.</li>
  <li>But with data-first, we will have just plain modals.</li>
  </ul>
  <p>Here is my base service layer.</p>
  <pre><code>public class BaseService&lt;T&gt; : IBaseService&lt;T&gt; where T : class, new()
  {
      private readonly IBaseRepository&lt;T&gt; _repository;
      private readonly IUnitOfWork _unitOfWork;
  
      public BaseService(IUnitOfWork unitOfWork, IBaseRepository&lt;T&gt; repository)
      {
          this._repository = repository;
          this._unitOfWork = unitOfWork;
      }
  
      public virtual Response&lt;T&gt; Insert(T model)
      {
          // TODO: can't access this columns since T is generic
          //model.CreationDateTime = DateTime.UtcNow;
          //model.CreationUserId = 1;
  
          var response = _repository.Add(model);
          _unitOfWork.Commit();
          return response;
      }
  }
  </code></pre>
  <blockquote>
  <p>What I did so far?</p>
  </blockquote>
  <p>I know I can go to each service layer individually and update there, like below.</p>
  <pre><code>public class SurveyRequestService : BaseService&lt;SurveyRequest&gt;, ISurveyRequestService
  {
      private readonly ISurveyRequestRepository _repository;
      private readonly IUnitOfWork _unitOfWork;
  
      public SurveyRequestService(IUnitOfWork unitOfWork, ISurveyRequestRepository repository)
          : base(unitOfWork, repository)
      {
          this._repository = repository;
          this._unitOfWork = unitOfWork;
      }
  
      public virtual Response&lt;SurveyRequest&gt; Insert(SurveyRequest model)
      {
          model.CreationDateTime = DateTime.UtcNow;
          model.CreationUserId = 1;
  
          var response = _repository.Add(model);
          _unitOfWork.Commit();
          return response;
      }
  }
  </code></pre>
  <p>Any help would be really appreciated. Thanks!</p>