2017-06-12 12:46:00 +03:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Net;
|
|
|
|
|
using System.Net.Http;
|
|
|
|
|
using System.Web.Http;
|
2017-06-12 13:37:48 +03:00
|
|
|
|
using BL.DTOs;
|
|
|
|
|
using BL.Interfaces;
|
2017-06-12 12:46:00 +03:00
|
|
|
|
|
|
|
|
|
namespace WebApi.Controllers
|
|
|
|
|
{
|
|
|
|
|
public class FoorumController : ApiController
|
|
|
|
|
{
|
2017-06-12 13:37:48 +03:00
|
|
|
|
private IFoorumService _foorumService;
|
|
|
|
|
public FoorumController(IFoorumService foorumService)
|
|
|
|
|
{
|
|
|
|
|
_foorumService = foorumService;
|
|
|
|
|
}
|
2017-06-12 12:46:00 +03:00
|
|
|
|
// GET api/<controller>
|
2017-06-12 13:37:48 +03:00
|
|
|
|
public IEnumerable<FoorumDTO> Get()
|
2017-06-12 12:46:00 +03:00
|
|
|
|
{
|
2017-06-12 13:37:48 +03:00
|
|
|
|
return _foorumService.GetAll();
|
2017-06-12 12:46:00 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 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)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|