public static SingletonMember SetInstance()
 {
     // Uses lazy initialization.
     // Note: this is not thread safe.
     _instance = null;
     return(_instance);
 }
 public static SingletonMember Instance()
 {
     // Uses lazy initialization.
     // Note: this is not thread safe.
     if (_instance == null)
     {
         using (SSLsEntities db = new SSLsEntities())
         {
             _instance = new SingletonMember();
             var data = db.Member.Include("Sex").Include("MemberShare.Share").Include("MemberShare.AgeOfShare")
                        .Where(w => w.Enable == true)
                        .ToList();
             _instance.Members = data;
         }
     }
     return(_instance);
 }