Ejemplo n.º 1
0
 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);
     }
 }
Ejemplo n.º 2
0
 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);
     }
 }