Guest User

Setup Code

a guest
Aug 13th, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.84 KB | None | 0 0
  1. private static IDictionary<string, object> testAttributes = new Dictionary<string, object>()
  2.     {
  3.         { "House", 1 },
  4.         { "Street", "Musterstraße" },
  5.         { "Single", true }
  6.     };
  7.  
  8.     private static List<Person> data = new List<Person>()
  9.     {
  10.         new Person() { ID = 1, Name = "Max", Surname = "Mustermann", AdditionalData = testAttributes },
  11.         new Person() { ID = 2, Name = "Resa", Surname = "Rito", AdditionalData = testAttributes }
  12.     };
  13.  
  14.     public List<Person> Persons { get; set; } = data;
  15.     public Person TestType { get; set; } = new Person();
  16.  
  17.  public class Person
  18.     {
  19.         public int ID { get; set; }
  20.         public string Name { get; set; }
  21.         public string Surname { get; set; }
  22.         public Dictionary<string, object> AdditionalData { get; set; } = new Dictionary<string, object>();
  23.     }
Advertisement
Add Comment
Please, Sign In to add comment