50 lines
1.0 KiB
C#
50 lines
1.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Net.Http;
|
|
using System.Text;
|
|
using System.Web.Http;
|
|
|
|
namespace MP_MON.Controllers
|
|
{
|
|
public class DbTaskController : ApiController
|
|
{
|
|
#region Public Methods
|
|
|
|
// DELETE: api/DbTask/5
|
|
public void Delete(int id)
|
|
{
|
|
}
|
|
|
|
// GET: api/DbTask
|
|
public IEnumerable<string> Get()
|
|
{
|
|
return new string[] { "Refresh", "value2" };
|
|
}
|
|
|
|
// GET: api/DbTask/5
|
|
public string Get(int id)
|
|
{
|
|
return $"DbMaint requested: {id} - {DateTime.Now}";
|
|
}
|
|
|
|
// POST: api/DbTask
|
|
public string Post([FromBody] List<string> names)
|
|
{
|
|
string answ = "";
|
|
foreach (var item in names)
|
|
{
|
|
answ += $"{item} | ";
|
|
}
|
|
return answ;
|
|
}
|
|
|
|
// PUT: api/DbTask/5
|
|
public void Put(int id, [FromBody] string value)
|
|
{
|
|
}
|
|
|
|
#endregion Public Methods
|
|
}
|
|
} |