someback
This commit is contained in:
parent
1a18c24f37
commit
f38b3743cd
@ -36,7 +36,7 @@ namespace DatabaseImplement.Implements
|
||||
}
|
||||
using var context = new FactoryGoWorkDatabase();
|
||||
if (model.DetailId.HasValue)
|
||||
return context.Workshops.Include(x => x.Production).Where(x => x.Production.Details.FirstOrDefault(y => y.DetailId == model.DetailId) != null).Where(x => x.UserId == model.UserId).Select(x => x.GetViewModel).ToList();
|
||||
return context.Workshops.Where(x => x.ProductionId != null).Include(x => x.Production).Where(x => x.Production!.Details.FirstOrDefault(y => y.DetailId == model.DetailId) != null).Where(x => x.UserId == model.UserId).Select(x => x.GetViewModel).ToList();
|
||||
else
|
||||
return context.Workshops.Include(x => x.Workers).ThenInclude(x => x.Worker).Where(x => x.UserId == model.UserId).Select(x => x.GetViewModel).ToList();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user