public IEnumerable <T> Gets(string query) { IList <T> entities; using (var connection = Connection.OpenConnection()) { entities = connection.Query <T>(query, CommandType.Text).ToList(); } return(entities); }
public IEnumerable <TaskListPriority> GetAll() { IEnumerable <TaskListPriority> result; using (var conn = connection.OpenConnection()) { result = conn.Query <TaskListPriority>("select * from TaskListPriority"); } return(result); }