public IActionResult Post([FromBody] Account acc) { try { _repository.AddEntity(acc); _repository.SaveAll(); return(Ok(acc)); } catch (Exception ex) { Console.WriteLine(ex.ToString()); return(BadRequest(ex.ToString())); } }