Ejemplo n.º 1
0
 /// <summary>
 /// Delte
 /// 根据实体删除。
 /// </summary>
 /// <typeparam name="TEntity">类型参数</typeparam>
 /// <param name="connection">DbConnection</param>
 /// <param name="entity">实体数据信息</param>
 /// <param name="transaction">事务</param>
 /// <returns>bool</returns>
 public static bool Delete <TEntity>(this IDbConnection connection, TEntity entity, IDbTransaction transaction = null)
 {
     try
     {
         return(DommelMapper.Delete <TEntity>(connection, entity, transaction));
     }
     catch (Exception ex) { throw new Exception(ex.Message); }
 }