我尝试将 2 个日期时间参数传递到我的 webget 中,但我不知道如何让它正常工作。我将在下面向您展示我的代码,我得到的错误也许有人现在知道它是如何工作的。
[WebGet]
public IQueryable<TestTable> GetCallersByDate(string beginDate, string eindDate)
{
testCDREntities context = this.CurrentDataSource;
DateTime startDt = DateTime.Parse(beginDate);
DateTime endDt = DateTime.Parse(eindDate);
var selectedOrders = from table in context.TestTables
where table.Created >= startDt && table.Created <= endDt
select table;
return selectedOrders;
}
网址:
http://localhost:50088/WebService.svc/GetCallersByDate?beginDate=2016/03/23T20:22:30:14&eindDate=2016/03/2T20:13:11:03
我希望有人能帮助我吗?