[Startup.cs]
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc().AddNewtonsoftJson(options => {
options.SerializerSettings.ContractResolver = new DefaultContractResolver();
});
}
|
|
public class Orders
{
public long OrderID { get; set; }
public readonly string CustomerID = "Vinet";
public int EmployeeID { get; set; }
. . . .
} |
<EjsGrid TValue="OrdersDetails" ModelType="@Model" AllowPaging="true">
<EjsDataManager Url="api/Default" Adaptor="Adaptors.WebApiAdaptor"></EjsDataManager>
………………………………….
</EjsGrid>
@code{
public List<OrdersDetails> Order = new List<OrdersDetails>();
public OrdersDetails Model = new OrdersDetails();
public class ViewModel
{
public long OrderID { get; set; }
public string CustomerID { get; set; }
. . . . . .
}
} |
<link rel='nofollow' href="https://cdn.syncfusion.com/ej2/17.3.17/fabric.css" rel="stylesheet" />
<script src="https://cdn.syncfusion.com/ej2/17.3.17/dist/ej2.min.js"></script>
<script src="https://cdn.syncfusion.com/ej2/17.3.17/dist/ejs.interop.min.js"></script>
|