Exemplo n.º 1
0
 public void can_delete()
 {
     using (var txn = new TransactionScope())
     {
         Assert.IsTrue(repo.Delete(1));
         Assert.IsNull(repo.Select(1));
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Deletes entity from DB.
        /// </summary>
        /// <param name="entity">Entity</param>
        public void Delete(object entity)
        {
            if (entity == null)
            {
                throw new ArgumentNullException("entity");
            }

            ExecuteInUnitOfWork(() => DataAccessRepository.Delete(entity));
        }