public static IEnumerable <TStatus> GetStatus()
        {
            LinqToSQLDataContext db = new LinqToSQLDataContext();

            var query = db.ExecuteQuery <TStatus>(@"SELECT *
                                                FROM TStatus");

            return(query);
        }
        public static IEnumerable <TBoard> GetLastBoardInserted()
        {
            LinqToSQLDataContext db = new LinqToSQLDataContext();

            var query = db.ExecuteQuery <TBoard>(@"SELECT TOP 1 *
                                                FROM TBoards
                                                ORDER BY BoardId DESC");

            return(query);
        }
        public static IEnumerable <TBoard> ReadBoards(int userId)
        {
            LinqToSQLDataContext db = new LinqToSQLDataContext();

            var query = db.ExecuteQuery <TBoard>(@"SELECT BoardId, BoardName, UserId
                                                FROM TBoards
                                                WHERE UserId = {0}", userId);

            return(query);
        }
        public static IEnumerable <TTask> GetTaskById(int taskId)
        {
            LinqToSQLDataContext db = new LinqToSQLDataContext();

            var query = db.ExecuteQuery <TTask>(@"SELECT *
                                                FROM TTasks
                                                WHERE TasktId = {0}", taskId);

            return(query);
        }
        public static IEnumerable <TTask> GetLastTaskInserted()
        {
            LinqToSQLDataContext db = new LinqToSQLDataContext();

            var query = db.ExecuteQuery <TTask>(@"SELECT TOP 1 *
                                                FROM TTasks
                                                ORDER BY TasktId DESC");

            return(query);
        }
        public static IEnumerable <TTask> ReadTasks(int listId)
        {
            LinqToSQLDataContext db = new LinqToSQLDataContext();

            var query = db.ExecuteQuery <TTask>(@"SELECT TasktId, TaskName, TaskDescription, TaskDue, TaskWho, TaskStatus, TaskList
                                                FROM TTasks
                                                WHERE TaskList = {0}", listId);

            return(query);
        }
        public static IEnumerable <TList> ReadLists(int boardId)
        {
            LinqToSQLDataContext db = new LinqToSQLDataContext();

            var query = db.ExecuteQuery <TList>(@"SELECT ListId, ListName, BoardId
                                                FROM TLists
                                                WHERE BoardId = {0}", boardId);

            return(query);
        }