public static void RemoveFromRegulars(string username) { Regulars.Remove(username); using (var db = new RegularsDB()) { db.Regulars.Where(p => p.Username == username).Delete(); } }
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; }
public static void AddToRegulars(string username) { Regulars.Add(username); using (var db = new RegularsDB()) { db.Insert(new Regular { Username = username }); } }