コード例 #1
0
 public async Task <ActionResult> UpdateBrand(OutModels.Models.Brand brand)
 {
     try
     {
         BrandModel wm = (BrandModel)_mapper.Map <OutModels.Models.Brand, BrandModel>(brand);
         return(new JsonResult(await this._repository.Update(wm)));
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
コード例 #2
0
 public async Task <ActionResult> DeleteBrand(OutModels.Models.Brand brand)
 {
     try
     {
         int id = brand.B_Id;
         if (id == 0)
         {
             return(new JsonResult(ResponseModel.Error("موردی یافت نشد")));
         }
         return(new JsonResult(await this._repository.LogicalDelete(id)));
     }
     catch (Exception ex)
     {
         return(null);
     }
 }