yavsc/Yavsc/Helpers/WorkflowHelpers.cs

22 lines
661 B
C#
Raw Normal View History

2017-01-31 13:19:12 +01:00
namespace Yavsc.Helpers
{
2017-02-03 15:25:47 +01:00
using System.Collections.Generic;
using System.Linq;
using Microsoft.Data.Entity;
2017-01-31 13:19:12 +01:00
using Models.Workflow;
2017-02-03 15:25:47 +01:00
using Yavsc.Models;
public static class WorkflowHelpers
{
2017-02-03 15:25:47 +01:00
public static List<PerformerProfile> ListPerformers(this ApplicationDbContext context, string actCode)
{
return context.Performers
.Include(p=>p.Activity)
.Include(p=>p.Performer)
.Include(p=>p.Performer.Posts)
.Include(p=>p.Performer.Devices)
.Where(p => p.Active && p.Activity.Any(u=>u.DoesCode==actCode)).OrderBy( x => x.Rate ).ToList();
}
}
}