Guest User

Untitled

a guest
Sep 19th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.76 KB | None | 0 0
  1. public sealed class CompanyDataManager
  2.     {
  3.         private static readonly CompanyDataManager instance = new CompanyDataManager();
  4.  
  5.         private CompanyDataManager()
  6.         {
  7.         }
  8.  
  9.         public static CompanyDataManager Instance
  10.         {
  11.             get { return instance; }
  12.         }
  13.  
  14.         private static IList<string> _countries;
  15.         private static IList<string> Countries
  16.         {
  17.             get
  18.             {
  19.                 if (_countries == null)
  20.                 {
  21.                     EntityCollection<CountryEntity> collection = CompanyInformationDAO.GetCountries();
  22.                     _countries = collection.Select(c => c.Country).ToList();
  23.                 }
  24.                 return _countries;
  25.             }
  26.         }
Add Comment
Please, Sign In to add comment