Как сериализовать данные? - PullRequest
0 голосов
/ 22 июня 2019

Как сериализовать или десериализовать данные?

WebMethod:

public string Get_OrderInfo(string Token)
{
    SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString);
    SqlCommand comm = new SqlCommand();

    conn.Open();

    comm.Connection = conn;
    comm.CommandText = "SP_GetAll_Info";
    comm.CommandType = CommandType.StoredProcedure;
    comm.CommandTimeout = 0;

    comm.Parameters.Add("@Token", SqlDbType.NVarChar, 50).Value = Token;
    SqlDataReader reader = comm.ExecuteReader();
    reader.
        reader.RemotingFormat = SerializationFormat.Binary;

    conn.Close(); SqlConnection.ClearAllPools();
    return string.Empty;
}
...