/// <summary>
 /// This Method save the log into the database.
 /// </summary>
 /// <param name="entity">The log entity to save.</param>
 public void SaveRequestLog(RequestLog entity)
 {
     Context.Requests.Add(entity);
     ((DbContext)Context).SaveChanges();
 }
Beispiel #2
0
        public void Cannot_Save_Because_IsNot_Implemented()
        {
            //Arrange
            ((FakeContext)repo.Context).SetUp();
            var log = new RequestLog { ID = 1, CityID = 2, TimeRequest = DateTime.Today};

            //Assert
            repoLog.SaveRequestLog(log);
        }