Skip to content

Commit 1acb382

Browse files
Merge pull request #26 from DevExpress-Examples/fix-25.1.3
Fix 25.1.3
2 parents e1ac1ab + f3d525f commit 1acb382

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2937
-3403
lines changed

ASP.NET Core/Controllers/HomeController.cs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,18 @@
44
using System.Threading.Tasks;
55
using Microsoft.AspNetCore.Mvc;
66

7-
namespace ASP_NET_Core.Controllers;
8-
public class HomeController: Controller {
9-
public IActionResult Index() {
10-
return View();
11-
}
7+
namespace ASP_NET_Core.Controllers
8+
{
9+
public class HomeController : Controller
10+
{
11+
public IActionResult Index()
12+
{
13+
return View();
14+
}
1215

13-
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
14-
public IActionResult Error() {
15-
return View();
16+
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
17+
public IActionResult Error() {
18+
return View();
19+
}
1620
}
1721
}

ASP.NET Core/Controllers/SampleDataController.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,19 @@ public class SampleDataController: Controller {
1515

1616
[HttpGet]
1717
public object Get(DataSourceLoadOptions loadOptions) {
18-
return DataSourceLoader.Load(SampleData.Orders, loadOptions);
18+
return DataSourceLoader.Load(SampleData.GetEmployees(), loadOptions);
19+
}
20+
21+
[HttpPost]
22+
public object Post(string values)
23+
{
24+
return Ok();
25+
}
26+
27+
[HttpPut]
28+
public object Put(int key, string values)
29+
{
30+
return Ok();
1931
}
2032

2133
}
File renamed without changes.

ASP.NET Core/Controllers/orig_HomeController.cs

Lines changed: 0 additions & 21 deletions
This file was deleted.

ASP.NET Core/Controllers/orig_SampleDataController.cs

Lines changed: 0 additions & 34 deletions
This file was deleted.

ASP.NET Core/Models/Employee.cs

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
using System;
2+
using System.ComponentModel.DataAnnotations;
3+
using System.Text.Json.Serialization;
4+
5+
namespace ASP_NET_Core.Models {
6+
public class Employee {
7+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("ID")]
8+
public int ID { get; set; }
9+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("FirstName")]
10+
public string FirstName { get; set; }
11+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("LastName")]
12+
public string LastName { get; set; }
13+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("Phone")]
14+
public string Phone { get; set; }
15+
16+
[Display(Name = "Title")]
17+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("Prefix")]
18+
public string Prefix { get; set; }
19+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("Position")]
20+
public string Position { get; set; }
21+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("BirthDate")]
22+
public DateTime? BirthDate { get; set; }
23+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("HireDate")]
24+
public DateTime? HireDate { get; set; }
25+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("Notes")]
26+
public string Notes { get; set; }
27+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("Email")]
28+
public string Email { get; set; }
29+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("Address")]
30+
public string Address { get; set; }
31+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("City")]
32+
public string City { get; set; }
33+
34+
[Display(Name = "State")]
35+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("StateID")]
36+
public int? StateID { get; set; }
37+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("State")]
38+
public string State { get; set; }
39+
40+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault), JsonPropertyName("AddressRequired")]
41+
public bool AddressRequired { get; set; }
42+
}
43+
}

0 commit comments

Comments
 (0)