public void ConfigureServices(IServiceCollection services)
{
// Add framework services.
services.AddMvc().AddJsonOptions(options =>
{
options.SerializerSettings.ContractResolver = new Newtonsoft.Json.Serialization.DefaultContractResolver();
});
} |
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc().AddJsonOptions(x => {
x.SerializerSettings.ContractResolver = new DefaultContractResolver();
});
services.AddAntiforgery(o => o.HeaderName = "XSRF-TOKEN");
} |
...
@Html.AntiForgeryToken()
<ejs-grid id="Grid" allowPaging="true" load="onLoad" actionComplete="actionComplete" toolbar="@( new List<object>() {"Add","Edit","Delete","Update","Cancel"})">
<e-grid-editSettings allowAdding="true" allowDeleting="true" allowEditing="true" mode="Dialog" template="#dialogtemplate"></e-grid-editSettings>
<e-data-manager url="/Index?handler=DataSource" insertUrl="/Index?handler=Insert" updateUrl="/Index?handler=Update" removeUrl="/Index?handler=Delete" adaptor="UrlAdaptor"></e-data-manager>
...
</ejs-grid>
... |