예제 #1
0
        public IEnumerable <T> Gets(string query)
        {
            IList <T> entities;

            using (var connection = Connection.OpenConnection())
            {
                entities = connection.Query <T>(query, CommandType.Text).ToList();
            }

            return(entities);
        }
예제 #2
0
        public IEnumerable <TaskListPriority> GetAll()
        {
            IEnumerable <TaskListPriority> result;

            using (var conn = connection.OpenConnection())
            {
                result = conn.Query <TaskListPriority>("select * from TaskListPriority");
            }
            return(result);
        }