Our main goal for the pages of WorkOrder and Discrepancy is to keep things disconnected and fast. Load the minimum that is required and have removal/addition handled by directly accessing the table, even if it is a join table, by a command handler or service. This limits the amount of simple unit testing via entity methods, however it should increase efficiency of queries by quite a bit. Includes will be used for WorkOrder but the writes will still be done by directly accessing the table, not by navigation properties. The WorkOrder page will not be done by partials with view components or anything, and won't use ajax calls for deletion and editing, it just won't be necessary. Discrepancy however, will use ajax and have partials and viewcomponents so that the page is responsive and has minimal reloads, it will count here. The template pages will be similar as well, and creating a template will be very similar to creation an actual one.
As for infrastructure, this means more repositories, services(potentially, we could simply add these join table manipulations to their parent services) and controllers. However, it allows for more ajax calls and partial loading for a better and faster user experience.
WorkOrderTemplate
[x] Ctor
[x] ChangeTitle
List of DiscrepancyTemplates to be handled by join table
DiscrepancyTemplate
[x] Ctor
[x] ChangeTitle
[x] ChangeDescription
[x] ChangeResolution
List of Parts to be handled by join table
Creation from WorkOrderTemplate to be handled by service that directly creates it through ctor and directly creates the join table records for it.
DiscrepancyTemplatePart
[x] Ctor
[x] Add/UpdateQty
WorkOrderTemplateDiscrepancyTemplate (I know....but normalization and user experience)
[x] Ctor
WorkOrder
[x] Ctor
[x] ChangeTitle
[x] Submit/Approve
Discrepancy
[x] Ctor
[x] ChangeStuff
Part
[x] Add new Id to allow for softdeletes (having a part number be a key wasn't very smart, as we need soft deletes and this now means that part number slot is taken..)
[x] Add MfrPartNumber (the old string id)
Updating of all the stuff that needs updating is in another issue
Final
[x] Add OnModelCreation handling for the 2 new join tables
[x] Update ApplicationContext with new entities and create db
Game plan
Our main goal for the pages of WorkOrder and Discrepancy is to keep things disconnected and fast. Load the minimum that is required and have removal/addition handled by directly accessing the table, even if it is a join table, by a command handler or service. This limits the amount of simple unit testing via entity methods, however it should increase efficiency of queries by quite a bit. Includes will be used for WorkOrder but the writes will still be done by directly accessing the table, not by navigation properties. The WorkOrder page will not be done by partials with view components or anything, and won't use ajax calls for deletion and editing, it just won't be necessary. Discrepancy however, will use ajax and have partials and viewcomponents so that the page is responsive and has minimal reloads, it will count here. The template pages will be similar as well, and creating a template will be very similar to creation an actual one.
As for infrastructure, this means more repositories, services(potentially, we could simply add these join table manipulations to their parent services) and controllers. However, it allows for more ajax calls and partial loading for a better and faster user experience.
WorkOrderTemplate
DiscrepancyTemplate
DiscrepancyTemplatePart
WorkOrderTemplateDiscrepancyTemplate (I know....but normalization and user experience)
WorkOrder
Discrepancy
Part
Final