コード例 #1
0
 public static void RemoveFromRegulars(string username)
 {
     Regulars.Remove(username);
     using (var db = new RegularsDB())
     {
         db.Regulars.Where(p => p.Username == username).Delete();
     }
 }
コード例 #2
0
 public static List<string> GetRegulars()
 {
     var returnList = new List<string>();
     using (var db = new RegularsDB())
     {
         var query = from p in db.Regulars select p;
         returnList.AddRange(query.ToList().Select(follower => follower.Username));
     }
     return returnList;
 }
コード例 #3
0
 public static void AddToRegulars(string username)
 {
     Regulars.Add(username);
     using (var db = new RegularsDB())
     {
         db.Insert(new Regular
         {
             Username = username
         });
     }
 }