This commit is contained in:
Paul Schneider 2017-01-20 00:51:02 +01:00
commit b45b927b1e
11 changed files with 100 additions and 56 deletions

View file

@ -52,10 +52,13 @@ namespace Yavsc.Controllers
{
throw new NotImplementedException("No Activity code");
}
ViewBag.Activity = _context.Activities.FirstOrDefault(a=>a.Code == id);
var result = _context.Performers
.Include(p=>p.Performer).Where(p => p.Activity.Any(u=>u.DoesCode==id)).OrderBy( x => x.MinDailyCost );
ViewBag.Activity = _context.Activities.FirstOrDefault(a=>a.Code == id);
var result = _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==id)).OrderBy( x => x.Rate ).ToList();
return View(result);
}

View file

@ -491,8 +491,11 @@ namespace Yavsc.Controllers
{
var user = GetCurrentUserAsync().Result;
var uid = user.Id;
var existing = _dbContext.Performers.Include(x => x.OrganizationAddress)
.Include(p=>p.Activity).FirstOrDefault(x => x.PerformerId == uid);
var existing = _dbContext.Performers
.Include(p=>p.Performer)
.Include(x => x.OrganizationAddress)
.Include(p=>p.Activity)
.FirstOrDefault(x => x.PerformerId == uid);
ViewBag.GoogleSettings = _googleSettings;
if (existing!=null)