aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Web/Tango.MachineService/Controllers/ValuesController.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2017-11-23 20:32:08 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2017-11-23 20:32:08 +0200
commitfd60c446a29842227028ad20385e9a99950ea231 (patch)
tree8a4349a3c22b60de31b68b3a379854772f404f43 /Software/Visual_Studio/Web/Tango.MachineService/Controllers/ValuesController.cs
parent5b1e302b85b71ebe130ac45437f2394f29ae9bae (diff)
downloadTango-fd60c446a29842227028ad20385e9a99950ea231.tar.gz
Tango-fd60c446a29842227028ad20385e9a99950ea231.zip
First Draft of machines web service.
Diffstat (limited to 'Software/Visual_Studio/Web/Tango.MachineService/Controllers/ValuesController.cs')
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Controllers/ValuesController.cs45
1 files changed, 45 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/ValuesController.cs b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/ValuesController.cs
new file mode 100644
index 000000000..f76d66836
--- /dev/null
+++ b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/ValuesController.cs
@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using Tango.MachineService.Models;
+
+namespace Tango.MachineService.Controllers
+{
+ public class ValuesController : ApiController
+ {
+ private static List<Person> persons = new List<Person>();
+
+ // GET api/values
+ public IEnumerable<Person> Get()
+ {
+ return persons;
+ }
+
+ // GET api/values/5
+ public Person Get(int id)
+ {
+ return persons[id];
+ }
+
+ // POST api/values
+ public Person Post([FromBody]Person person)
+ {
+ persons.Add(person);
+ return person;
+ }
+
+ // PUT api/values/5
+ public void Put(Person person)
+ {
+
+ }
+
+ // DELETE api/values/5
+ public void Delete(int id)
+ {
+ }
+ }
+}