public ResponseBo Delete(PersonTableDeleteBo deleteBo) { ResponseBo responseBo = new ResponseBo(); try { using (SqlConnection conn = DbAccess.Connection.GetConn()) { var p = new DynamicParameters(); base.AddStandartSpParams(ref p, deleteBo); p.Add("@Id", deleteBo.Id, DbType.Int64, ParameterDirection.Input); conn.Execute("spPersonTableDel", p, commandType: CommandType.StoredProcedure); responseBo.Message = p.Get <string>("@Message"); responseBo.IsSuccess = p.Get <bool>("@IsSuccess"); } } catch (Exception ex) { responseBo = base.SaveExLog(ex, this.GetType(), MethodBase.GetCurrentMethod().Name, deleteBo); } return(responseBo); }
public ResponseDto Delete(PersonTableDeleteDto deleteDto) { ResponseDto responseDto = new ResponseDto(); PersonTableDeleteBo deleteBo = new PersonTableDeleteBo() { Id = deleteDto.Id, Session = Session }; ResponseBo responseBo = personTableBusiness.Delete(deleteBo); responseDto = responseBo.ToResponseDto(); return(responseDto); }