The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ViewModelBase.cs 646B

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using Teknik.Configuration;
  6. namespace Teknik.ViewModels
  7. {
  8. public abstract class ViewModelBase
  9. {
  10. private Config _config;
  11. public Config Config
  12. {
  13. get
  14. {
  15. if (_config == null)
  16. {
  17. _config = Config.Load();
  18. }
  19. return _config;
  20. }
  21. }
  22. public bool Error { get; set; }
  23. public string ErrorMessage { get; set; }
  24. public ViewModelBase()
  25. {
  26. Error = false;
  27. }
  28. }
  29. }