Last active
September 1, 2016 02:45
-
-
Save Layoric/9ba328f5582632e0c1e9e7c3df47b952 to your computer and use it in GitHub Desktop.
New Public Gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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