Beispiel #1
0
 public static void CleanStateForChat(UserInChat userInChat, string connectionString)
 {
     using (var db = new DbContext(connectionString))
     {
         var userInChatPersistance = db.UsersInChat.GetUserInChatPersistance(userInChat);
         if (userInChatPersistance != null)
         {
             db.Delete(userInChatPersistance.FlowStates);
             db.SaveChanges();
         }
     }
 }
Beispiel #2
0
 public IState GetStateForUserInChat(UserInChat userInChat)
 {
     return(DatabaseState.GetRootState(userInChat, _connectionString));
 }