public void Update(string username, User user) { var parms = new Dictionary<string, string>(); parms.Add("@TableName", "users"); parms.Add("@User", "user"); parms.Add("@UserName", username); _db.Update("users", user.ToDictionary(), "@User = '******'", parms); }
public void Update(string username, User user) { var parms = new Dictionary <string, string>(); parms.Add("@TableName", "users"); parms.Add("@User", "user"); parms.Add("@UserName", username); _db.Update("users", user.ToDictionary(), "@User = '******'", parms); }
private User NewUser(string username) { var user = new User(username); user.FirstSeen = DateTime.Now; var stream = _twitch.GetTwitchStream(Chat.MainChannel.Substring(1)); if (stream != null) { user.FirstGame = stream.game; } var data = user.ToDictionary(); data.Add("user", user.Name); _db.Insert("users", data); return(user); }
private User NewUser(string username) { var user = new User(username); user.FirstSeen = DateTime.Now; var stream = _twitch.GetTwitchStream(Chat.MainChannel.Substring(1)); if (stream != null) user.FirstGame = stream.game; var data = user.ToDictionary(); data.Add("user", user.Name); _db.Insert("users", data); return user; }