Baz.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.ComponentModel.DataAnnotations;
  5. using System.Linq;
  6. using System.Text;
  7. using MonoTests.ModelProviders;
  8. namespace MonoTests.Common
  9. {
  10. class Baz
  11. {
  12. // DO NOT change the order of properties - tests depend on it
  13. // DO NOT change the column types - tests depend on it
  14. public int Column1 { get; set; }
  15. public int PrimaryKeyColumn1 { get; set; }
  16. public string PrimaryKeyColumn2 { get; set; }
  17. public bool PrimaryKeyColumn3 { get; set; }
  18. public string CustomPropertyColumn1 { get; set; }
  19. [UIHint ("UI Hint")]
  20. public string CustomPropertyColumn2 { get; set; }
  21. public int GeneratedColumn1 { get; set; }
  22. [UIHint ("UI Hint")]
  23. public int GeneratedColumn2 { get; set; }
  24. [ReadOnly (true)]
  25. public int ReadOnlyColumn { get; private set; }
  26. [ReadOnly (false)]
  27. public int ReadWriteColumn { get; private set; }
  28. [DisplayFormat (NullDisplayText="Text")]
  29. public DateTime NullDisplayTextColumn { get; set; }
  30. [Required (ErrorMessage = "Custom error message")]
  31. public int ErrorMessageColumn1 { get; set; }
  32. [Required (ErrorMessage = "s")]
  33. public int ErrorMessageColumn2 { get; set; }
  34. [UIHint ("")]
  35. public int EmptyHintColumn { get; set; }
  36. [DynamicDataSortable (true)]
  37. public int SortableColumn1 { get; set; }
  38. public Baz ()
  39. {
  40. Column1 = 123;
  41. PrimaryKeyColumn1 = 456;
  42. PrimaryKeyColumn2 = "primary key value";
  43. PrimaryKeyColumn3 = true;
  44. }
  45. }
  46. }