public void PostProduct(WHPostProductModel model) { try { SqlDataAccess sql = new SqlDataAccess(); sql.SaveData("dbo.spWareHousePostAll", model, "WMData"); } catch (Exception ex) { throw new InvalidDataException($"PostProduct(WHPostProductModel model) coundn't post data. (model = {model.FactoryNumber})", ex); } }
public WHProductModel PostProduct(WHPostProductModel model) { try { SqlDataAccess sql = new SqlDataAccess(); var output = sql.LoadData <WHProductModel, dynamic>("dbo.spToBuysProductsPostAll", model, "WMData"); return(output.First()); } catch (Exception ex) { throw new InvalidDataException($"PostProduct(WHPostProductModel model) coundn't post data. (model = {model.FactoryNumber})", ex); } }