c# - must be a non-abstract type with a public parameterless constructor in redis -
when save object, got below error
must non-abstract type public parameterless constructor in order use parameter 't' in generic type or method 'servicestack.redis.redisclient.store<t>(t) redisclass.getinstnace().store(msg); // error here redisclass.getinstnace().save();
as third party's class, can not edit how save object?
could create wrapper around third party object call constructor, store wrapper?
e.g.
public class mywrapper { public thirdpartyobject thirdpartyinstance { get; set; } public mywrapper() { thirdpartyinstance = new thirdpartyobject("constructors"); } }
Comments
Post a Comment