Getting a forum with id's works

This commit is contained in:
2017-06-12 14:43:31 +03:00
parent 475f0d539c
commit bf9ec07808
7 changed files with 60 additions and 11 deletions

View File

@@ -23,9 +23,14 @@ namespace WebApi.Controllers
}
// GET api/<controller>/5
public string Get(int id)
public IHttpActionResult Get(int id)
{
return "value";
var f = _foorumService.Get(id);
if (f == null)
{
return NotFound();
}
return Ok(f);
}
// POST api/<controller>