// GET: /<controller>/ public Board[] GetBoards() { string ConnectionString = "User ID=postgres;Password=Nisse;Host=localhost;Port=5432;Database=life;Pooling=true;"; NpgsqlConnection connection = new NpgsqlConnection(ConnectionString); connection.Open(); Board[] boards; using (connection) { Life repo = new Life(connection); boards = repo.Boards(); } return(boards); }