public DbUserStat GetStat(string login) { var query = Query <DbUserStat> .EQ(user => user.login, login); var stat = UserStats.FindOne(query); if (stat == null) { stat = new DbUserStat { login = login, sessions = new List <int>(), platform = string.Empty }; } return(stat); }
public void SaveStat(DbUserStat stat) { UserStats.Save(stat); }