Skip to content

Commit 0d82535

Browse files
Update to 25.1.3+
1 parent 1076aad commit 0d82535

32 files changed

+2995
-22
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Mvc;
6+
7+
namespace ASP_NET_Core.Controllers
8+
{
9+
public class HomeController : Controller
10+
{
11+
public IActionResult Index()
12+
{
13+
return View();
14+
}
15+
16+
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
17+
public IActionResult Error() {
18+
return View();
19+
}
20+
}
21+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Net;
5+
using System.Net.Http;
6+
using ASP_NET_Core.Models;
7+
using DevExtreme.AspNet.Data;
8+
using DevExtreme.AspNet.Mvc;
9+
using Microsoft.AspNetCore.Mvc;
10+
11+
namespace ASP_NET_Core.Controllers {
12+
13+
[Route("api/[controller]")]
14+
public class SampleDataController : Controller {
15+
16+
[HttpGet]
17+
public object Get(DataSourceLoadOptions loadOptions)
18+
{
19+
return DataSourceLoader.Load(SampleData.GetEmployees(), loadOptions);
20+
}
21+
22+
[HttpPost]
23+
public object Post(string values)
24+
{
25+
return Ok();
26+
}
27+
[HttpPut]
28+
public object Put(int key, string values)
29+
{
30+
return Ok();
31+
}
32+
33+
}
34+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using ASP_NET_Core.Models;
2+
using DevExtreme.AspNet.Data;
3+
using DevExtreme.AspNet.Mvc;
4+
using Microsoft.AspNetCore.Mvc;
5+
using System;
6+
using System.Collections.Generic;
7+
using System.Linq;
8+
using System.Threading.Tasks;
9+
10+
namespace ASP.NET_Core.Controllers {
11+
12+
[Route("api/[controller]")]
13+
public class StatesController : Controller {
14+
[HttpGet]
15+
public object Get(DataSourceLoadOptions loadOptions)
16+
{
17+
return DataSourceLoader.Load(SampleData.GetStates(), loadOptions);
18+
}
19+
}
20+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
using Newtonsoft.Json;
2+
using System;
3+
using System.ComponentModel.DataAnnotations;
4+
5+
namespace ASP_NET_Core.Models {
6+
public class Employee {
7+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "ID")]
8+
public int ID { get; set; }
9+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "FirstName")]
10+
public string FirstName { get; set; }
11+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "LastName")]
12+
public string LastName { get; set; }
13+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "Phone")]
14+
public string Phone { get; set; }
15+
16+
[Display(Name = "Title")]
17+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "Prefix")]
18+
public string Prefix { get; set; }
19+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "Position")]
20+
public string Position { get; set; }
21+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "BirthDate")]
22+
public DateTime? BirthDate { get; set; }
23+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "HireDate")]
24+
public DateTime? HireDate { get; set; }
25+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "Notes")]
26+
public string Notes { get; set; }
27+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "Email")]
28+
public string Email { get; set; }
29+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "Address")]
30+
public string Address { get; set; }
31+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "City")]
32+
public string City { get; set; }
33+
34+
[Display(Name = "State")]
35+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "StateID")]
36+
public int? StateID { get; set; }
37+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "State")]
38+
public string State { get; set; }
39+
40+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "AddressRequired")]
41+
public bool AddressRequired { get; set; }
42+
}
43+
}

0 commit comments

Comments
 (0)