示例#1
0
 /// <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();
 }
示例#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);
        }