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