Working full stack forums get
This commit is contained in:
@@ -4,15 +4,22 @@ 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
|
||||
{
|
||||
// GET api/<controller>
|
||||
public IEnumerable<string> Get()
|
||||
private IFoorumService _foorumService;
|
||||
public FoorumController(IFoorumService foorumService)
|
||||
{
|
||||
return new string[] { "value1", "value2" };
|
||||
_foorumService = foorumService;
|
||||
}
|
||||
// GET api/<controller>
|
||||
public IEnumerable<FoorumDTO> Get()
|
||||
{
|
||||
return _foorumService.GetAll();
|
||||
}
|
||||
|
||||
// GET api/<controller>/5
|
||||
|
||||
Reference in New Issue
Block a user