I am trying to get this working, but its fails with the following error when I try to fill my dataset.
(Its an Azure SQL, and the client is on .net 7.0)
No mapping exists from object type System.DateOnly to a known managed provider native type.’
My Stored proc is
Create proc [dbo].[sproc_WMSSummaryStats]
@userId INT,
@datefrom date,
@dateto date
AS
….
and my web api end point looks like
[HttpGet("homePageSummaryData")]
public string homePageSummaryData(int user, int warehouseId, int zoneId, DateOnly startDate, DateOnly endDate, string licenseKey)
and I call the SP from the Web Api like this
cmd.Connection = conn;
conn.Open();
cmd.Parameters.AddWithValue("@userID", user);
cmd.Parameters.AddWithValue("@datefrom" , startDate);
cmd.Parameters.AddWithValue("@dateto", endDate);
I have tried to test the end point in swagger, but it’s generating the same error…. of course..
2