public async Task <ActionResult> UpdateAttribute(OutModels.Models.Attribute attribute) { try { AttributeModel am = (AttributeModel)_mapper.Map <OutModels.Models.Attribute, AttributeModel>(attribute); return(new JsonResult(await this._repository.Update(am))); } catch (Exception ex) { return(null); } }
public async Task <ActionResult> DeleteAttribute(OutModels.Models.Attribute attribute) { try { int id = attribute.A_Id; if (id == 0) { return(new JsonResult(ResponseModel.Error("موردی یافت نشد"))); } return(new JsonResult(await this._repository.LogicalDelete(id))); } catch (Exception ex) { return(null); } }