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); } }
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); } }