public async Task <IActionResult> Create(ReferenceAssembly assembly)
        {
            try
            {
                ReferenceAssembly createdAssembly = await _context.CreateReferenceAssembly(assembly);

                return(RedirectToAction(nameof(Edit), new { Id = createdAssembly.Id }));
            }
            catch (Exception e) when(e is ControllerNotFoundException || e is ControllerBadRequestException || e is ControllerUnauthorizedException)
            {
                return(View(new ReferenceAssembly()));
            }
        }
        public async Task <ActionResult <ReferenceAssembly> > CreateReferenceAssembly([FromBody] ReferenceAssembly assembly)
        {
            try
            {
                ReferenceAssembly createdAssembly = await _context.CreateReferenceAssembly(assembly);

                return(CreatedAtRoute(nameof(GetReferenceAssembly), new { id = createdAssembly.Id }, createdAssembly));
            }
            catch (ControllerNotFoundException e)
            {
                return(NotFound(e.Message));
            }
            catch (ControllerBadRequestException e)
            {
                return(BadRequest(e.Message));
            }
            catch (ControllerUnauthorizedException)
            {
                return(new UnauthorizedResult());
            }
        }