public async Task <IActionResult> Create([Bind("MachiningToolForWorkId,DateUsed,WorkItemId,WorkItem,MachiningToolId,MachiningTool,Comment,UserId,MachiningType")] MachiningToolForWork machiningToolForWork)
        {
            if (ModelState.IsValid)
            {
                var machiningTool = await _repo.GetMachiningToolForToolForWork(machiningToolForWork.MachiningToolId);

                machiningTool.ToolCount--;
                machiningToolForWork.MachiningToolForWorkId = Guid.NewGuid();
                SetUIDs();
                await _repo.AddMachiningToolForWork(machiningToolForWork);

                return(RedirectToAction(nameof(Index)));
            }
            return(View(machiningToolForWork));
        }