diff --git a/samples/features/json/todo-app/dotnet-rest-api/.gitignore b/samples/features/json/todo-app/dotnet-rest-api/.gitignore index df51f995..2d9630ee 100644 --- a/samples/features/json/todo-app/dotnet-rest-api/.gitignore +++ b/samples/features/json/todo-app/dotnet-rest-api/.gitignore @@ -1 +1,2 @@ -setup/setup.sql \ No newline at end of file +TodoApp.xproj.user +.vs/* \ No newline at end of file diff --git a/samples/features/json/todo-app/dotnet-rest-api/Controllers/TodoController.cs b/samples/features/json/todo-app/dotnet-rest-api/Controllers/TodoController.cs index 1b7df777..782fd649 100644 --- a/samples/features/json/todo-app/dotnet-rest-api/Controllers/TodoController.cs +++ b/samples/features/json/todo-app/dotnet-rest-api/Controllers/TodoController.cs @@ -1,11 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using Belgrade.SqlClient; using Microsoft.AspNetCore.Mvc; -using Belgrade.SqlClient; using System.Data.SqlClient; using System.IO; +using System.Threading.Tasks; namespace TodoApp.Controllers { diff --git a/samples/features/json/todo-app/dotnet-rest-api/Startup.cs b/samples/features/json/todo-app/dotnet-rest-api/Startup.cs index b1c1e84c..ec333350 100644 --- a/samples/features/json/todo-app/dotnet-rest-api/Startup.cs +++ b/samples/features/json/todo-app/dotnet-rest-api/Startup.cs @@ -1,15 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using Belgrade.SqlClient; +using Belgrade.SqlClient.SqlDb; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -using Belgrade.SqlClient; -using Belgrade.SqlClient.Common; -using Belgrade.SqlClient.SqlDb; using System.Data.SqlClient; namespace TodoApp diff --git a/samples/features/json/todo-app/dotnet-rest-api/project.json b/samples/features/json/todo-app/dotnet-rest-api/project.json index 4370dc88..2ccbf1ff 100644 --- a/samples/features/json/todo-app/dotnet-rest-api/project.json +++ b/samples/features/json/todo-app/dotnet-rest-api/project.json @@ -10,8 +10,7 @@ "Microsoft.Extensions.Logging": "1.0.0-rc2-final", "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final", "Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final", - "System.Data.SqlClient": "4.1.0-rc2-24027", - "System.IO": "4.1.0-rc2-24027" + "System.Data.SqlClient": "4.1.0-rc2-24027" }, "tools": { diff --git a/samples/features/json/todo-app/dotnet-rest-api/project.lock.json b/samples/features/json/todo-app/dotnet-rest-api/project.lock.json index 127ee2bb..c048b4f7 100644 --- a/samples/features/json/todo-app/dotnet-rest-api/project.lock.json +++ b/samples/features/json/todo-app/dotnet-rest-api/project.lock.json @@ -5404,8 +5404,7 @@ "Microsoft.Extensions.Logging >= 1.0.0-rc2-final", "Microsoft.Extensions.Logging.Console >= 1.0.0-rc2-final", "Microsoft.Extensions.Logging.Debug >= 1.0.0-rc2-final", - "System.Data.SqlClient >= 4.1.0-rc2-24027", - "System.IO >= 4.1.0-rc2-24027" + "System.Data.SqlClient >= 4.1.0-rc2-24027" ], ".NETFramework,Version=v4.6": [] }, diff --git a/samples/features/json/todo-app/dotnet-rest-api/setup/setup.sql b/samples/features/json/todo-app/dotnet-rest-api/setup/setup.sql new file mode 100644 index 00000000..b434c1eb --- /dev/null +++ b/samples/features/json/todo-app/dotnet-rest-api/setup/setup.sql @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS Todo + +GO + +CREATE TABLE Todo ( + Id int IDENTITY PRIMARY KEY, + Title nvarchar(30) NOT NULL, + Description nvarchar(4000), + Completed bit, + TargetDate datetime2 +) + +GO + +INSERT INTO Todo (Title, Description, Completed, TargetDate) +VALUES +('Install SQL Server 2016','Install RTM version of SQL Server 2016', 0, '2016-06-01'), +('Get new samples','Go to github and download new samples', 0, '2016-06-02'), +('Try new samples','Install new Management Studio to try samples', 0, '2016-06-02') \ No newline at end of file