Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i get a problem in my code #16

Closed
quan01994 opened this issue Feb 28, 2018 · 13 comments
Closed

i get a problem in my code #16

quan01994 opened this issue Feb 28, 2018 · 13 comments

Comments

@quan01994
Copy link

image

it's my code to update redis
image

this activity has some property
image

but second to insertOrUpdate Datetime? will change value 。
I'm sure I got the value is right from foreground ,
but update reids or get from redis has some problem

@quan01994
Copy link
Author

i think You ignore the time zone

@quan01994
Copy link
Author

image
image

@catcherwong
Copy link
Member

@quan01994

Hey, I add a test named Issues16_DateTimeTest for your case.

It runs well for me!

@quan01994
Copy link
Author

@catcherwong
image

it's my model
image

services.AddDefaultMessagePackSerializer();

@quan01994
Copy link
Author

you can test this.

@quan01994
Copy link
Author

image
if i delete this code .i get this exception

@quan01994
Copy link
Author

quan01994 commented Feb 28, 2018

EasyCaching.Serialization.Json
I did not find it on nuget

@catcherwong
Copy link
Member

If you want to use MessagePackSerializer as the default Serializer, you should not put it before the redis provider.

AddDefaultRedisCache register DefaultBinaryFormatterSerializer as the serializer. The last one will be used!! When using DefaultBinaryFormatterSerializer , you need to mark the class as Serializable

       public void ConfigureServices(IServiceCollection services)
        {
            services.AddMvc();

            services.AddDefaultRedisCache(option=>
            {                
                option.Endpoints.Add(new ServerEndPoint("127.0.0.1", 6379));
                option.Password = "";                                                  
            });
            //put here!
            services.AddDefaultMessagePackSerializer();
        }

@catcherwong
Copy link
Member

EasyCaching.Serialization.Json is not published yet!

Maybe this weekend or next week I will publish a new version of them. It will contains the updates of #12 .

@quan01994
Copy link
Author

quan01994 commented Feb 28, 2018

i got this ,
image

i wan't use json FormatterSerializer
JsonObject is in Pomelo.JsonObject

@catcherwong
Copy link
Member

catcherwong commented Feb 28, 2018

@quan01994

I test the code, and it also return the correct result.

screen shot 2018-02-28 at 11 11 40 pm

Here is my test code.

EasyCachingDateTime

@quan01994
Copy link
Author

ok,thank you。

@quan01994
Copy link
Author

quan01994 commented Feb 28, 2018

I used the wrong method when I used it 。so i get some Inexplicable mistake。
Very much looking forward to new features
不过我还是用中文来提问题吧,说英文还要想半天。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants