public IActionResult Create(string login1, string login2) { if (login1 != null && login2 != null) { var accountId1 = accountBaseFunction.GetMyAccount(login1, null, "Name"); var accountId2 = accountBaseFunction.GetMyAccount(login2, null, "Name"); Ban ban = new Ban(); ban.FirstAccountId = accountId1.Id; ban.SecondAccountId = accountId2.Id; banService.Create(ban); return(Ok()); } return(BadRequest()); }