Advertisement
Guest User

Untitled

a guest
Feb 18th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. using System;
  2. using System.Globalization;
  3. using Newtonsoft.Json;
  4.  
  5. namespace NeonTo99__.NET_.Models
  6. {
  7. class User
  8. {
  9. public User(string username, string password)
  10. {
  11. this.Username = username;
  12. this.Password = password;
  13. }
  14.  
  15. public string Username { get; set; }
  16. public string Password { get; set; }
  17. public string Token { get; set; }
  18. public string RequestDate { get {
  19. return DateTime.UtcNow.ToString("s", CultureInfo.InvariantCulture);
  20. } set {
  21. RequestDate = value;
  22. }
  23. }
  24.  
  25. public string ToJson()
  26. {
  27. return JsonConvert.SerializeObject(this);
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement