Skip to content

Commit afc72fe

Browse files
Implement ASP.NET Core
1 parent dfecdfe commit afc72fe

15 files changed

+299
-923
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Linq;
44
using System.Threading.Tasks;
55
using DevExtreme.AspNet.Data;
66
using DevExtreme.AspNet.Mvc;
7-
using DevExtremeAspNetCoreApp1.Models;
7+
using ASP_NET_Core.Models;
88
using Microsoft.AspNetCore.Http;
99
using Microsoft.AspNetCore.Mvc;
1010

11-
namespace DevExtremeAspNetCoreApp1.Controllers
11+
namespace ASP_NET_Core.Controllers
1212
{
1313
[Route("api/[controller]")]
1414
[ApiController]
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Diagnostics;
44
using System.Linq;
55
using System.Threading.Tasks;
66
using DevExtreme.AspNet.Data;
77
using DevExtreme.AspNet.Mvc;
8-
using DevExtremeAspNetCoreApp1.Models;
8+
using ASP_NET_Core.Models;
99
using Microsoft.AspNetCore.Http;
1010
using Microsoft.AspNetCore.Mvc;
1111
using Newtonsoft.Json;
1212

13-
namespace DevExtremeAspNetCoreApp1.Controllers
13+
namespace ASP_NET_Core.Controllers
1414
{
1515
[Route("api/[controller]/[action]")]
1616
public class DataGridEmployeesByStateController : Controller
@@ -30,7 +30,7 @@ public IActionResult Post(string values)
3030
if (!TryValidateModel(newEmployee))
3131
return BadRequest("Failed to insert item");
3232

33-
SampleData.DataGridEmployeesByState.Append(newEmployee);
33+
SampleData.DataGridEmployeesByState.Add(newEmployee);
3434

3535
return Ok();
3636
}
@@ -42,11 +42,9 @@ public IActionResult Put(int key, string values)
4242

4343
PopulateModel(JsonConvert.DeserializeObject<EmployeeByState>(values), employee);
4444

45-
4645
if (!TryValidateModel(employee))
4746
return BadRequest("Failed to update item");
4847

49-
5048
return Ok();
5149
}
5250

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Linq;
44
using System.Threading.Tasks;
55
using DevExtreme.AspNet.Data;
66
using DevExtreme.AspNet.Mvc;
7-
using DevExtremeAspNetCoreApp1.Models;
7+
using ASP_NET_Core.Models;
88
using Microsoft.AspNetCore.Http;
99
using Microsoft.AspNetCore.Mvc;
1010

11-
namespace DevExtremeAspNetCoreApp1.Controllers
11+
namespace ASP_NET_Core.Controllers
1212
{
1313
[Route("api/[controller]")]
1414
[ApiController]
1515
public class DataGridStatesWithCitiesController : ControllerBase
1616
{
17-
1817
[HttpGet]
1918
public object Get(DataSourceLoadOptions loadOptions)
2019
{
2120
return DataSourceLoader.Load(SampleData.StatesWithCities, loadOptions);
2221
}
23-
2422
}
2523
}

ASP.NET Core/Controllers/SampleDataController.cs

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

ASP.NET Core/DevExtremeAspNetCoreApp1/Controllers/orig_HomeController.cs

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

ASP.NET Core/DevExtremeAspNetCoreApp1/Models/orig_SampleData.cs

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

ASP.NET Core/DevExtremeAspNetCoreApp1/Models/orig_SampleOrder.cs

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

0 commit comments

Comments
 (0)