This commit is contained in:
@@ -106,12 +106,20 @@ namespace AyaNova.Biz
|
||||
.ThenInclude(author => author.Photo)
|
||||
.ToList();
|
||||
}
|
||||
WARNING: Since version 3.0.0, each Include will cause an additional JOIN to be added to SQL queries produced by relational providers, whereas previous versions generated additional SQL queries. This can significantly change the performance of your queries, for better or worse. In particular, LINQ queries with an exceedingly high number of Include operators may need to be broken down into multiple separate LINQ queries in order to avoid the cartesian explosion problem.
|
||||
WARNING: Since version 3.0.0, each Include will cause an additional JOIN to be added to SQL queries produced by relational providers, whereas previous versions generated additional SQL queries.
|
||||
This can significantly change the performance of your queries, for better or worse.
|
||||
In particular, LINQ queries with an exceedingly high number of Include operators may need to be broken down into multiple separate LINQ queries in order to avoid the cartesian explosion problem.
|
||||
*/
|
||||
//This is simple so nothing more here, but often will be copying to a different output object or some other ops
|
||||
//var ret = await ct.WorkOrder.SingleOrDefaultAsync(m => m.Id == fetchId);
|
||||
|
||||
var ret = await ct.WorkOrder.Include(w => w.WorkorderItems).SingleOrDefaultAsync(m => m.Id == fetchId);
|
||||
var ret =
|
||||
await ct.WorkOrder
|
||||
.Include(w => w.WorkorderItems)
|
||||
.ThenInclude(wi=>wi.WorkorderItemLabors)
|
||||
.Include(w => w.WorkorderItems)
|
||||
.ThenInclude(wi=>wi.worko)
|
||||
.SingleOrDefaultAsync(m => m.Id == fetchId);
|
||||
|
||||
if (logTheGetEvent && ret != null)
|
||||
{
|
||||
|
||||
@@ -30,11 +30,13 @@ namespace AyaNova.Models
|
||||
|
||||
//dependents
|
||||
public List<WorkOrderItemLabor> WorkorderItemLabors { get; set; }
|
||||
public List<WorkOrderItemPart> WorkorderItemParts { get; set; }
|
||||
|
||||
public WorkOrderItem()
|
||||
{
|
||||
Tags = new List<string>();
|
||||
WorkorderItemLabors = new List<WorkOrderItemLabor>();
|
||||
WorkorderItemParts = new List<WorkOrderItemPart>();
|
||||
}
|
||||
|
||||
//Not persisted business properties
|
||||
|
||||
Reference in New Issue
Block a user