Skip to content

Instantly share code, notes, and snippets.

@Layoric
Last active September 1, 2016 02:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Layoric/9ba328f5582632e0c1e9e7c3df47b952 to your computer and use it in GitHub Desktop.
Save Layoric/9ba328f5582632e0c1e9e7c3df47b952 to your computer and use it in GitHub Desktop.
New Public Gist
using System;
using ServiceStack;
using ServiceStack.Text;
public class GetPersonResponse
{
public string FirstName { get;set; }
public string LastName { get;set; }
public int Age { get;set; }
public string PostCode { get;set; }
}
public class Person
{
public string FirstName { get;set; }
public string LastName { get;set; }
public int Age { get;set; }
}
var person = new Person {
FirstName = "Bob",
LastName = "Smith",
Age = 40
};
var personResponse = new GetPersonResponse() { PostCode = "3000" }.PopulateWith(person);
personResponse.PrintDump();
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ServiceStack.Text" version="4.0.62" targetFramework="net45" />
<package id="ServiceStack.Client" version="4.0.62" targetFramework="net45" />
<package id="ServiceStack.Interfaces" version="4.0.62" targetFramework="net45" />
</packages>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment