public UserPL GetUser(int groupId, string nickname) { QueryUser userquey = new QueryUser(connectionString); userquey.SetGroupFilter(groupId); userquey.SetNicknameFilter(nickname); IList <UserPL> userlist = userquey.Select(); if (userlist.Count == 1) { foreach (UserPL user in userlist) { return(user); } return(null); } else { Logger.Instance.Info($"Found {userlist.Count.ToString()} users with same nickname:{nickname} and id:{groupId.ToString()}"); return(null); } }
public Boolean Register(int groupId, string nickname, string password) { QueryUser userquey = new QueryUser(connectionString); return(userquey.Insert(groupId, nickname, password)); }