public DataSet Highscore() { DBCustomer dbc = new DBCustomer(); DataSet ds = dbc.Highscore(); Console.WriteLine(); Console.WriteLine("Highscore() " + GetExecutionThreadTime()); return(ds); }
public Stream HighscoreJson() { DBCustomer dbc = new DBCustomer(); DataSet ds = dbc.Highscore(); string jsonString = string.Empty; jsonString = JsonConvert.SerializeObject(ds); Console.WriteLine(); Console.WriteLine("HighscoreJson() " + GetExecutionThreadTime()); WebOperationContext.Current.OutgoingResponse.ContentType = "application/json; charset=utf-8"; return(new MemoryStream(Encoding.UTF8.GetBytes(jsonString))); }