public async Task <ActionResult> UpdateCoppon(OutModels.Models.Coppon coppon) { try { CopponModel wm = (CopponModel)_mapper.Map <OutModels.Models.Coppon, CopponModel>(coppon); return(new JsonResult(await this._repository.Update(wm))); } catch (Exception ex) { return(null); } }
public async Task <ActionResult> DeleteCoppon(OutModels.Models.Coppon coppon) { try { int id = coppon.CP_Id; if (id == 0) { return(new JsonResult(ResponseModel.Error("موردی یافت نشد"))); } return(new JsonResult(await this._repository.LogicalDelete(id))); } catch (Exception ex) { return(null); } }