initial import
This commit is contained in:
parent
f9da4de3a5
commit
95c2619c4c
2 changed files with 172 additions and 0 deletions
24
Yavsc/ApiControllers/PerformersApiController.cs
Normal file
24
Yavsc/ApiControllers/PerformersApiController.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using System.Linq;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Workflow;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
[Produces("application/json")]
|
||||
[Route("api/performers")]
|
||||
public class PerformersApiController : Controller
|
||||
{
|
||||
ApplicationDbContext dbContext;
|
||||
public PerformersApiController(ApplicationDbContext context)
|
||||
{
|
||||
dbContext = context;
|
||||
}
|
||||
public IEnumerable<PerformerProfile> Get()
|
||||
{
|
||||
return dbContext.Performers.Where(p=>p.Active && p.AcceptPublicContact);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue