public async Task <ActionResult> UpdateLabel(OutModels.Models.ProductLabel label) { try { ProductLabelModel lbl = (ProductLabelModel)_mapper.Map <OutModels.Models.ProductLabel, ProductLabelModel>(label); return(new JsonResult(await this._repository.Update(lbl))); } catch (Exception ex) { return(null); } }
public async Task <ActionResult> DeleteLabel(OutModels.Models.ProductLabel label) { try { int id = label.L_Id; if (id == 0) { return(new JsonResult(ResponseModel.Error("موردی یافت نشد"))); } return(new JsonResult(await this._repository.LogicalDelete(id))); } catch (Exception ex) { return(null); } }