public object postDate(DateTime start)
{
//Save the DateTime to sql Server
//return success code or object
}
jsonの文字列は、DateTimeの投稿とどのように見えますか?WebApiへのリクエストDateTime JSONオブジェクトを使用して投稿しますか?
public object postDate(DateTime start)
{
//Save the DateTime to sql Server
//return success code or object
}
jsonの文字列は、DateTimeの投稿とどのように見えますか?WebApiへのリクエストDateTime JSONオブジェクトを使用して投稿しますか?
オブジェクトを作成し、このようにそれをラップ:
Public class SampleModel
{
Public DateTime Start {get; set;}
}
、その後のアクションに投稿:
public object postDate(SampleModel sampleModel)
{
// sampleModel.Start
//Save the DateTime to sql Server
//return success code or object
}
JSONは次のようにする必要があります
{
"Start":"2017-05-11T09:18:54.092Z"
}
HTTPSこれを読みます://stackoverflow.com/help/how-to-ask – Ice