public async Task <IActionResult> PutAuthorisedperson9144(int id, AuthorisedPerson9144 authorisedperson9144)
        {
            if (id != authorisedperson9144.userID)
            {
                return(BadRequest());
            }

            _context.Entry(authorisedperson9144).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!Authorisedperson9144Exists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        public async Task <ActionResult <AuthorisedPerson9144> > PostAuthorisedperson9144(AuthorisedPerson9144 ap)
        {
            // _context.Authorisedperson9144.Add(authorisedperson9144);


            var authorisedPersonAccountID = await Task.FromResult(_context.AuthorisedPerson9144.FromSqlRaw("EXEC ADD_AUTHORISED_PERSON " +
                                                                                                           "@PFIRSTNAME = " + ap.Firstname +
                                                                                                           ", @PSURNAME = " + ap.Lastname +
                                                                                                           ", @PEMAIL = " + ap.Email +
                                                                                                           ", @PPASSWORD = "******", @PACCOUNTID = " + ap.accountID).ToList());

            // await _context.SaveChangesAsync();

            return(authorisedPersonAccountID[0]);
        }