public int Update(ProductListingUpdateRequest model)
 {
     Adapter.ExecuteQuery("Product_Listing_Update", new[] {
         SqlDbParameter.Instance.BuildParameter("@Price", model.Price, System.Data.SqlDbType.NVarChar),
         SqlDbParameter.Instance.BuildParameter("@UserBaseId", model.UserBaseId, System.Data.SqlDbType.Int),
         SqlDbParameter.Instance.BuildParameter("@UrlLocation", model.UrlLocation, System.Data.SqlDbType.NVarChar),
         SqlDbParameter.Instance.BuildParameter("@Id", model.Id, System.Data.SqlDbType.Int)
     });
     return(0);
 }
Пример #2
0
 public IHttpActionResult Put(ProductListingUpdateRequest model)
 {
     try
     {
         ItemResponse <int> response = new ItemResponse <int>
         {
             Item         = _productListingService.Update(model),
             IsSuccessful = true
         };
         return(Ok());
     }
     catch (Exception ex) { return(BadRequest(ex.Message)); }
 }