public ResponseBo Delete(PersonAddressDeleteBo deleteBo)
        {
            ResponseBo responseBo = new ResponseBo();

            try
            {
                using (SqlConnection conn = DbAccess.Connection.GetConn())
                {
                    var p = new DynamicParameters();
                    base.AddStandartSpParams(ref p, deleteBo);

                    p.Add("@AddressId", deleteBo.AddressId, DbType.Int64, ParameterDirection.Input);

                    conn.Execute("spPersonAddressDel", 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);
        }
Beispiel #2
0
        public ResponseDto Delete(PersonAddressDeleteDto deleteDto)
        {
            ResponseDto responseDto = new ResponseDto();

            PersonAddressDeleteBo deleteBo = new PersonAddressDeleteBo()
            {
                AddressId = deleteDto.AddressId,

                Session = Session
            };

            ResponseBo responseBo = personAddressBusiness.Delete(deleteBo);

            responseDto = responseBo.ToResponseDto();

            return(responseDto);
        }