Ejemplo n.º 1
0
 public IHttpActionResult AddAccountToCompany(int currentAccountId, [FromBody] AccountCreateDTO newaccount)
 {
     if (ModelState.IsValid)
     {
         var acc = _accountService.AddAccountToCompany(currentAccountId, newaccount);
         if (acc != null)
         {
             return(Ok(acc));
         }
         else
         {
             return(BadRequest("Bruger blev ikke lavet"));
         }
     }
     return(BadRequest(ModelState));
 }