Last post Aug 15, 2019 11:11 AM by PatriceSc
Aug 15, 2019 07:27 AM|DevManNZ1981|LINK
I would like to call web API endpoints (HttpPOST) which will create records in the database. (i.e create products)
I will read data from excel file such as productName.
I am not sure what is the right approach 1) Powershell script 2) database script or any better approach.
public IHttpActionResult PostProduct(int productId)
May I know what is the best way to call it. An example will be excellent
Aug 15, 2019 11:11 AM|PatriceSc|LINK
Not 100% clear but if you want to send http request from a C# app you could just use https://docs.microsoft.com/en-us/aspnet/web-api/overview/advanced/calling-a-web-api-from-a-net-client rather
than going through PowerShell or a SQL database.
Edit: or you want to upload an Excel file and use that to insert data into a db ? You would use EF or ADO.NET then ? Your exact intent is unclear, I'm not sure if you mean you want to create or call a web api and how it is related to using Excel as a data
For now it seems you want to upload an Excel file to update a database ?