Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

object was not passed to the web api

$
0
0

Hi,

I have written as following for creating the Schedule

  dataSource: {
                    batch: true,
                    transport: {
                        read: {
                            url: "http://localhost:2237/api/values/GetSchedule",
                            dataType: "jsonp"
                        },
                        update: {
                            url: "http://demos.telerik.com/kendo-ui/service/tasks/update",
                            dataType: "jsonp"
                        },
                        create: {
                            method:"post",
                            url: "http://localhost:2237/api/values/SaveSchedule",
                            data: ,
                            contentType: "application/json;charset=utf-8",
                            dataType: "json"
                        },
                        destroy: {
                            url: "http://demos.telerik.com/kendo-ui/service/tasks/destroy",
                            dataType: "jsonp"
                        },
                        parameterMap: function (options, operation) {
                            if (operation !== "read" && options.models) {
                                return { models: kendo.stringify(options.models) };
                            }
                        }
                    },

in the above in create section how can i pass the object to the api .

In Api

  public void SaveSchedule(Schedular callback)
        {
           
        }

here Schedular is a class consisting of all properties with same name in the ui.

whenever i have saved the data , in the api it shown as callback null.

 

Can you please provide me the solution for this.

 

Thanks,


Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>