Skip to content

Instantly share code, notes, and snippets.

@jglozano
Last active November 16, 2017 03:09
Show Gist options
  • Save jglozano/a1a37c423c4b8c056eeda347d178ac01 to your computer and use it in GitHub Desktop.
Save jglozano/a1a37c423c4b8c056eeda347d178ac01 to your computer and use it in GitHub Desktop.
.NET Development YTT Demo - code for interface, service, and viewmodel
// Interface
public interface IPersonService
{
PersonViewModel[] GetRetiredPeople(string dataPath);
}
// Implementation
public class PersonService : IPersonService
{
public PersonViewModel[] GetRetiredPeople(string dataPath)
{
return new[] { new PersonViewModel { FullName = "Test Person" } };
}
}
//ViewModel
public class PersonViewModel
{
public string FullName { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment