Entity writes to Redis--mistakenly treats classes as entity classes

Source: Internet
Author: User

I've been writing to redis all the time, and today we're doing it again, and it's not going to work, and the value in Redis is always empty.

Finally found that the class as an entity class, of course, do not write in.

Put the class:

<summary>
Redis Entities
</summary>
public class Redis
{
public string Tdtype;//tdtype
public string Tdaccount;//tdaccount
public string Brokerid;//brokerid
public string Userid;//userid
public string tdpswd;//tdpswd
public string Auth_type;//auth_type
public string Safety_info;//safety_info
public string Secret_key_info;//secret_key_info
}

As entities:

<summary>
Redis Entities
</summary>
public class Redis
{
<summary>
Tdtype
</summary>
public string Tdtype {get; set;}
<summary>
Tdaccount
</summary>
public string Tdaccount {get; set;}
<summary>
Brokerid
</summary>
public string Brokerid {get; set;}
<summary>
Userid
</summary>
public string UserID {get; set;}
<summary>
tdpswd
</summary>
public string tdpswd {get; set;}
<summary>
Auth_type
</summary>
public string Auth_type {get; set;}
<summary>
Safety_info
</summary>
public string Safety_info {get; set;}
<summary>
Secret_key_info
</summary>
public string Secret_key_info {get; set;}

}

The problem is found, and the data can finally be written correctly.

How painful the understanding!!!!

Entity writes to Redis--mistakenly treats classes as entity classes

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.