vreksam/WebApi/Controllers/FoorumController.cs

46 lines
1002 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using BL.DTOs;
using BL.Interfaces;
namespace WebApi.Controllers
{
public class FoorumController : ApiController
{
private IFoorumService _foorumService;
public FoorumController(IFoorumService foorumService)
{
_foorumService = foorumService;
}
// GET api/<controller>
public IEnumerable<FoorumDTO> Get()
{
return _foorumService.GetAll();
}
// GET api/<controller>/5
public string Get(int id)
{
return "value";
}
// POST api/<controller>
public void Post([FromBody]string value)
{
}
// PUT api/<controller>/5
public void Put(int id, [FromBody]string value)
{
}
// DELETE api/<controller>/5
public void Delete(int id)
{
}
}
}