Eric Clark
Eric Clark

Reputation: 60

Where did ServiceStack.Common.Utils.ReflectionUtils go from 3.9.69 to 4.0.20

I can't seem to find what to use instead of this, but here's what I had before:

using ServiceStack.Common.Utils;

...

public Profile Put(ProfileUpdate req) {
    var cred = this.GetCredential();
    this.AskUser();
    var data = Db.GetById<Profile>(cred.UserId);

    ReflectionUtils.PopulateObject<Profile, ProfileUpdatable>(data, req);

Now I can't find where Utils or ReflectionUtils or PopulateObject has gone in version 4.0.20

Upvotes: 0

Views: 101

Answers (1)

Scott
Scott

Reputation: 21521

Those functions have been replaced with these auto mapping functions, documented here.

So you would use:

var data = Db.GetById<Profile>(cred.UserId);
data.PopulateWith(req);

Upvotes: 2

Related Questions