WaveBox.Core.Model.User.ListOfSessions C# (CSharp) Method

ListOfSessions() public method

public ListOfSessions ( ) : IList
return IList
        public IList<Session> ListOfSessions()
        {
            ISQLiteConnection conn = null;
            try
            {
                conn = Injection.Kernel.Get<IDatabase>().GetSqliteConnection();
                return conn.Query<Session>("SELECT RowId AS RowId, * FROM Session WHERE UserId = ?", this.UserId);
            }
            catch (Exception e)
            {
                logger.Error(e);
            }
            finally
            {
                Injection.Kernel.Get<IDatabase>().CloseSqliteConnection(conn);
            }

            return new List<Session>();
        }