如何序列化数据表?

时间:2019-06-22 16:58:48

标签: protobuf-net

如何序列化或反序列化数据表?

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;
}

0 个答案:

没有答案